{"slug": "show-hn-agentlink-messaging-for-claude-code-agents-on-different-accounts", "title": "Show HN: Agentlink – Messaging for Claude Code agents on different accounts", "summary": "A developer released Agentlink, an open-source tool that lets Claude Code and Codex agents on different accounts and different machines message each other, addressing any agent as name@host (e.g. reviewer@laptop.local). Agentlink requires Claude Code 2.1.318 or newer on each machine, runs on Apple silicon Macs or Linux (Intel Macs are not supported), and needs machines on the same network or Tailscale; each invite adds one machine and expires after 24 hours. An incoming message wakes an idle Claude Code or Codex session through a background hook, and setup requires no config files, accounts, or server, with agentlink uninstall removing its tools and hook.", "body_md": "Let AI agents on different Claude accounts — and different machines — message each other.\nClaude Code's own messaging needs every session on one account; agentlink doesn't. Address any\nagent as `name@host` (e.g. `reviewer@laptop.local`). An incoming message **wakes an idle Claude\nCode or Codex session**, just like agents talking on a single machine.\n\n[Watch the whole one-minute demo, from setup to reply, at poly.io/agentlink](https://poly.io/agentlink)\n\n- [Claude Code](https://claude.com/claude-code) 2.1.318 or newer on each machine. Codex 0.167 or\nnewer is woken too, and other MCP agents can[join](#what-you-get) (for a machine without Claude\nCode, set`AGENTLINK_SKIP_CHECKS=1` for the installer).\n- An Apple silicon Mac or Linux. Intel Macs aren't currently supported.\n- Machines on the same network, or Tailscale on each of them.\n\nThe installer brings everything else. It needs no sudo.\n\n**First machine** — paste into Claude Code (or run the command yourself):\n\nSet up agentlink on this machine: run `curl -fsSL https://raw.githubusercontent.com/tombaldwin/agentlink/main/install.sh | sh`, then show me the prompt it prints for adding other machines, and tell me to type /reload-plugins.\n\nOr install the Claude Code plugin, which teaches Claude to set agentlink up and use it, then ask Claude to set up agentlink:\n\n```\n/plugin install agentlink --marketplace tombaldwin/agentlink\n```\n\n**Every other machine** — paste the prompt the first machine printed. It looks like:\n\nJoin my agentlink network: run `curl … | sh` — then tell me to type /reload-plugins.\n\nEach invite adds one machine and expires after 24 hours. The pinned key means curl only talks to\nthe machine that made the invite. That key exists only while the invite is open, so a used invite\nline stops working (curl reports a key mismatch or a 404). Run `agentlink invite` on any member\nfor a new one.\n\n**Then** type `/reload-plugins` in Claude Code. That session is now on the network, and so is every\nnew one. (If that doesn't work, restart it: `claude --continue` picks up where you left off.)\n\nThat's it: no config files, no accounts, no server to run. Setup adds agentlink's tools and a small\nbackground hook to Claude Code's settings (and Codex's, if it's installed), and `agentlink uninstall`\ntakes them out again. On Apple\nsilicon Macs it installs\nagentlink as a signed app (`~/Applications/agentlink.app`, from the inviting machine or the latest\nrelease, refused unless Apple's certificate for agentlink's team signed it); macOS asks once to\nlet **agentlink** find devices on your local network: click Allow. Elsewhere it uses npm, and\nbrings its own Node.js if the machine doesn't have a recent one. For the next machine, ask Claude\non any member to add one (or run `agentlink invite`).\n\nAgents are named after their project folder, so a session in `~/code/reviewer` on the machine\n`desk` is `reviewer@desk.local`. Ask Claude who's online, then ask it to message someone:\n\n**You, to Claude on your laptop:** Ask [reviewer@desk.local](mailto:reviewer@desk.local) why the build is failing.\n\n**Claude:** Sent. `pushed to reviewer@desk.local's live session`\n\nThe session on `desk` wakes, even if it was idle, and works on it. Its answer wakes the session on\nyour laptop in the same way.\n\nYou don't need the exact address. `reviewer@desk` works (`.local` is added, and case doesn't\nmatter), and so does a machine's Tailscale name or IP address. You can also just say \"ask the\nreviewer on my desktop\": Claude checks who's online and works out which agent you mean.\n\nMore ways to use it, such as a reviewer on another account, waking a session from CI, or a nightly\njob that reports in the morning, are in [Recipes](https://github.com/tombaldwin/agentlink/blob/main/docs/recipes.md).\n\n- **Wake on message.** A background hook wakes the session when a message arrives, even when it's\nidle, and Claude reads it and acts on it (it still stops at any permission prompt). Tools:`send` ,`peers` ,`inbox` , plus`network` and`invite` for managing the network. Removing machines and uninstalling stay in the terminal, so\nyou always see the command first.\n- **Nothing gets lost.** Messages are stored on disk at every hop and retried. If the recipient\nisn't running, its machine keeps the message; if the whole machine is off, copies wait on up\nto 3 other online machines and whoever sees it return first delivers. Copies that reach a\nmachine twice are dropped, though a session that dies just as a message is shown gets it again\nwhen it restarts.\nMessages expire after 7 days. A session can have 2,000 unread messages waiting, and a machine's\nstore can reach 1 GB (`maxWaiting` and`maxStoreMB` in`~/.agentlink/config.json` ). Past that, a\nmessage from another machine waits at the sender and is retried, and a send from this machine\nfails with an error, so a runaway agent stops there.\n- **Zero-config discovery.** Machines on the same LAN find each other automatically (encrypted UDP\nbeacons) and share what they know, so every machine learns the whole network.\n- **Multiple Claude accounts.** Every`CLAUDE_CONFIG_DIR` account setup can find is enabled\n(`~/.claude*` dirs, shell aliases, and the one the shell is using); run`agentlink setup` again to\nadd new accounts.\n- **Beyond the LAN.** With Tailscale on both machines,`agentlink invite` includes the Tailscale\nname and joining machines use it automatically. A machine that moves between networks is found\nagain at its other addresses, within a couple of minutes.\n- **Codex.** If Codex is installed, setup adds agentlink to`~/.codex/config.toml` too. The next\ntime Codex starts, it asks you to trust agentlink's hook: trust it, and a message gives an idle\nCodex session a turn (through`codex queue` , Codex 0.167 or newer). Codex sessions are named after\ntheir project folder.\n- **Other agents.** Any MCP agent can join with`agentlink mcp --poll` (it reads with`inbox` instead of being woken).\n- **Channels and managed accounts.** If your organisation's policy turns channels off,`agentlink claude` sessions can't tell, and pushed messages don't show up. Set`AGENTLINK_POLL=1` so they're\nread with`inbox` instead.\n\nName a session with `AGENTLINK_NAME=<name> claude` (default: the project folder name).\n\nClaude Code can already [message between your own sessions](https://code.claude.com/docs/en/cross-session-messaging):\non one machine over a local socket, and between machines through Anthropic's servers, with a\nclaude.ai sign-in and Remote Control. If that covers you, you don't need agentlink. agentlink is for\nsessions on different Claude accounts, agents other than Claude Code, and messages that stay\nbetween your own machines.\n\nClaude handles everyday use and invites; these are for terminals and scripts.\n\n```\nagentlink send <name@host> <msg>   agentlink peers     agentlink status\nagentlink invite [--list|--revoke] agentlink remove <host>\nagentlink compact [--yes]          agentlink uninstall\n```\n\n`agentlink help <command>` (or `agentlink <command> --help`) shows a command's options.\n`agentlink peers` says why a machine is offline (the node log, `~/.agentlink/node.log`, records\nwhen a machine stops or starts answering).\n\nTab completion, including the addresses of agents that are online after `agentlink send`: add\n`eval \"$(agentlink completion zsh)\"` to `~/.zshrc`, or `eval \"$(agentlink completion bash)\"` to\n`~/.bashrc`.\n\nRe-run the install line from **Setup** on each machine (or `npm install -g @tombaldwin/agentlink`\nfollowed by `agentlink setup`). It keeps the machine's key, network and messages. Upgrade all\nyour machines: a machine running an incompatible version is reported as such\n(`… runs an older version of agentlink`) and can't exchange messages until it's upgraded.\nClaude sessions that were running during the upgrade say they need restarting\n(`claude --continue` resumes the conversation); they never stop the newer node.\n\nEach machine has its own key. The network is the list of machines' keys, kept and shared by the members. Any member can invite machines, and a machine can remove the ones that joined after it (the first machine can remove anyone).\n\n- **Encrypted, and nothing for strangers.** Machines talk TLS and prove their keys to each other\ninside the connection. A laptop at a café that tries a home address now held by a stranger\ndoesn't say who it is or send anything before the check fails. And anyone who connects to a\nmachine sees only a throwaway key, so a laptop can't be recognised as it moves between networks.\n- **Joining.** An invite is a one-time token plus a key the inviting machine presents while the\ninvite is open. Someone watching the\nnetwork learns nothing from a join, and can't swap the installer. A used or expired invite is\nworthless.\n- **Machines can't impersonate each other.** Every message is signed by the machine that sent it,\nand machines relaying a copy can't change it (they can read it: members are trusted).`agentlink remove <host>` takes a machine off the\nnetwork; members that were offline learn about it when they come back.\n- **Members are trusted.** Any member can add machines, and every agent on a member machine can\nmessage yours. Only add machines you control.\n- **Prompt injection.** Messages come from other AI agents. agentlink tells Claude to treat them\nas requests from a colleague, not instructions from you, and to check with you before\nanything destructive or sensitive.\n\nSee [SECURITY.md](https://github.com/tombaldwin/agentlink/blob/main/SECURITY.md) for details and known limitations.\n\n- Only interactive sessions are woken. `claude -p` runs and SDK sessions aren't, and nothing about\nthem changes: their messages wait for the`inbox` tool.\n- A Codex session is woken from its first prompt on, when Codex runs agentlink's hook. After you close a Codex window, Codex's background server can keep the session open, and then answers its messages by itself. Two Codex sessions in the same folder can't be told apart: only the newer one is woken. A Codex turn you stop with Esc holds messages back until your next prompt.\n- A woken session reads messages by itself, but stops at permission prompts as usual, so replying\nmay wait for you. Setup allows only the `inbox` and`peers` tools to run unattended.\n- Senders see \"pushed to … live session\" when the session has been told, not when Claude has read the message.\n- A session idle for more than 20 days stops being woken until its next turn. So does one you interrupt with Esc after it's woken and before it reads its messages; they're still there to read.\n- A VPN that blocks local traffic makes your machines show as offline. Allow local network access in its settings, or use Tailscale. Messages wait until the machines can reach each other.\n- Over SSH on a Mac, Claude Code can't reach its login while the keychain is locked: run\n`security unlock-keychain` first.\n- Re-running `agentlink setup` keeps the machine on its network; pass`--new-network` to start a\nnew one.\n- A machine's name is fixed when it joins. To rename it, run `agentlink remove <old name>` on a\nmachine that joined before it, then run a new invite line with`| sh -s -- --host <new name>` in\nplace of`| sh` . Messages already queued for its old name wait until they expire.\n- A removed machine comes back with a new invite: it gets a new key, and its messages, delivered or not, are dropped. Joining another network drops them too.\n- A machine joins once, for one computer login. A second login on the same machine is refused, because the machine's name is already a member. Several Claude accounts under one login are fine.\n- Apple silicon Macs and Linux. Intel Macs aren't currently supported: the npm install runs there, but macOS may stop it reaching other machines (see below), and there's no app for them yet.\n- On Linux, `.local` names need mDNS (`avahi-daemon` and`libnss-mdns` ); without it, use the IP\nline the invite offers. Port 7777 must be open in any firewall between your machines.\n- On macOS, agentlink needs Local Network access to reach your other machines. The app asks for\nit by name; if you clicked Don't Allow, turn **agentlink** on under System Settings → Privacy &\nSecurity → Local Network. An npm install on a Mac (`AGENTLINK_APP=0` ) runs as plain`node` at\nlogin, which macOS may block without asking:`agentlink peers` then shows machines as offline\nwith`EHOSTUNREACH` .\n\n```\nnpm test    # unit tests + multi-node end-to-end: live delivery, offline session, offline machine\n            # via holders, dedupe, poll mode, outsiders, forged and altered messages, strangers\n            # at stored addresses, relays, invites and joining, removal, big backlogs, node\n            # restart, IP/Tailscale aliases\n```\n\nThe macOS app (agentlink as a single signed executable, so macOS asks for Local Network access by\nname; see `scripts/build-app.mjs`):\n\n```\nnpm run build:app                     # dist/agentlink-<version>-macos-<arch>.zip\nnpm run build:app -- --arch x64 --sign \"Developer ID Application: …\" --notarize <profile>\nAGENTLINK_TEST_EXE=dist/arm64/agentlink.app/Contents/MacOS/agentlink npm run test:e2e\n```\n\nReleases (signed and notarized app, GitHub Release, npm): see [docs/releasing.md](https://github.com/tombaldwin/agentlink/blob/main/docs/releasing.md).", "url": "https://wpnews.pro/news/show-hn-agentlink-messaging-for-claude-code-agents-on-different-accounts", "canonical_source": "https://github.com/tombaldwin/agentlink", "published_at": "2026-11-10 13:14:09+00:00", "updated_at": "2026-11-10 13:24:15.831332+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools"], "entities": ["Agentlink", "Claude Code", "Codex", "Anthropic", "OpenAI", "Tailscale", "Apple", "tombaldwin"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-agentlink-messaging-for-claude-code-agents-on-different-accounts", "markdown": "https://wpnews.pro/news/show-hn-agentlink-messaging-for-claude-code-agents-on-different-accounts.md", "text": "https://wpnews.pro/news/show-hn-agentlink-messaging-for-claude-code-agents-on-different-accounts.txt", "jsonld": "https://wpnews.pro/news/show-hn-agentlink-messaging-for-claude-code-agents-on-different-accounts.jsonld"}}