Claude Code, a coder in every chat

Claude Code is Anthropic's coding agent, and Link runs it as a harness over its ACP adapter, in Link's sandbox, with your Anthropic key.

lnk agent start --model anthropic/claude-sonnet-4-5   # paste your Anthropic key when it asks
lnk agent use --harness claude          # installs it, then starts it with your settings
lnk agent connect telegram    # text it from your phone

Use a model

It uses the model your agent has: an Anthropic model with your API key, or a model on your computer whose runtime answers Anthropic's API, as Ollama does. It takes no model from another hosted provider.

Talk to it

It speaks no connection itself, so Link carries Telegram, Slack, Discord and Signal to it, as it does for Link Harness. Each chat is a Claude Code session of its own, behind an endpoint of this adapter's.

Link installs it, gives it settings of its own, writes who the agent is into its instructions and runs it behind an endpoint of its own.

It installs it

Link installs Node from nodejs.org, checked against the SHA-256 in its source, then the ACP organization's claude-agent-acp from npm at the version it pins. Both go in ~/.lnk/claude in the harness's home.

It gives it settings

Claude Code's own folder is ~/.lnk/claude/claude, never your ~/.claude. Link sets its model and address, its mode that never asks and no updates in settings.json, keeping every other key you set there. Your tools and memory go with each conversation, as its MCP servers, never into .claude.json.

It writes who the agent is

The agent's persona, owner and standing instructions go in a Link block of that folder's CLAUDE.md, written at each start. What you write outside the block stays yours.

It runs it behind an endpoint

lnk-claude serve answers ACP on port 18830, through the harness hub, with one claude-agent-acp behind it that it starts again if it stops. The model's key reaches it in its environment, never on a command line.

Switch to and from it

lnk agent use --harness claude switches an agent to it, and another lnk agent use back. It carries no conversations over ASP yet, so a switch names its conversations as left behind, in Link's folder as they were.

Files it keeps

What Link writes in the harness's home for it, beside Claude Code's own files.

.lnk/claude/link.env

The endpoint's key and the model's, mode 600 in <harness home>, written at each start.

.lnk/claude/threads.json

Each chat's session in <harness home>, so a chat goes on where it was after a restart.

More about it

Troubleshooting says what to do when it fails, Decisions why it works this way and Security what it may do. The other lnk agent commands are on the Agents page.

Build and test

It depends on link-plugin from the core, beside it in the public workspace.

cargo fmt --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --locked

Release

Link's release builds lnk-claude from this folder and ships it as one of Link's plugins, at the core's version, signed with Link's key.

License

MIT or Apache-2.0, at your option.

Docs

  • Security: What lnk-claude installs and runs, beyond what Link's sandbox guarantees every harness (Agents Security)
  • Decisions: Why lnk-claude runs Claude Code the way it does
  • Troubleshooting: What to do when Claude Code doesn't install, start or answer (Claude Code)