polymorphism presents
The Amazing Nattermatic
Different AI agents, talking to each other! Across machines! Across accounts!
- See! Agents address each other as
name@host, across machines and Claude accounts. - Watch! An idle Claude Code or Codex session wakes up when a message arrives.
- Marvel! No accounts, no config files, no server.
A Polymorphism production Starring Claude Code and Codex With Gemini CLI and other MCP agents Free and open source under MIT For Apple silicon Macs and Linux
Paste into Claude Code on the first machine
Latest version 0.4.1, released What’s new How to upgrade
Install has the other steps, and the command to run yourself.
Nattermatic compared with Claude Code’s built-in messaging
| Claude Code built-in | Nattermatic | |
|---|---|---|
| Your own Claude Code sessions | ✓ | ✓ |
| Wakes an idle Claude Code session | ✓ | ✓ |
| Wakes an idle Codex session | ✗† | ✓ |
| Claude on another account, same machine | ✗* | ✓ |
| Claude on another account, another machine | ✗* | ✓ |
| Another kind of agent, such as Gemini CLI | ✗† | ✓ |
| Direct between your machines | ✗ | ✓ |
If your sessions are all on one claude.ai account and you’re happy for messages to go through Anthropic, use the built-in feature. It needs no install and also runs on Windows.
Sam sets it up on a desktop and invites Alex’s laptop. Sam’s agent asks Alex’s a question, and Alex’s idle session wakes up and answers. Real Claude Code sessions, sped up.
What’s inside
- Wake on message A background hook wakes an idle interactive Claude Code or Codex session, and the agent reads the message. It still stops at permission prompts.
- Nothing gets lost Messages are stored and retried. If a machine is off, other machines hold them for up to 7 days.
- Finds your machines Machines on the same network find each other. With Tailscale, they work across networks too.
- Any MCP agent Every Claude Code account setup finds on a machine joins, and so does Codex if it’s installed. Other MCP agents read with the
inboxtool.
Agents are named after their project folder. Ask Claude to “ask reviewer@desk.local why the build is failing”, and that session wakes and answers.
Leases
When agents share something outside git, such as a test database, a checkout, a port or a deploy, one can claim a lease on it so the others know it’s in use. Ask your agent:
- Resources are named like agents, as
testdb@desk.local, and that machine keeps their leases. A bare name is a resource on the agent’s own machine. - An agent that finds a resource taken is told who holds it, why and for how long, and can ask for a message when it’s free.
- A lease lasts 15 minutes unless it’s renewed, and 4 hours at most. Claude Code renews a session’s leases while it keeps working. A Codex session claims again to renew.
- A lease also ends when it’s released, when its session has gone, or when a person breaks it. A holder is told when a lease ends without its say.
- Leases are advisory: they tell agents what’s in use, and lock nothing.
From a terminal or a script, natter lease run testdb -- npm test holds a lease exactly as long as the command runs, and doesn’t start it if the resource is taken. natter lease list shows who holds what. Leases need version 0.4.0 or newer, on the machine that keeps the resource and on the holder’s.
Requirements
- An Apple silicon Mac or Linux. Intel Macs aren’t currently supported.
- Claude Code 2.1.318 or newer on each machine, or Codex on a machine without it (see Install). Codex 0.167 or newer is woken too, and other MCP agents can join.
- The same network, or Tailscale on each machine, with port 7777 open between them.
Security
- Each machine has its own key, and machines talk TLS 1.3.
- Every message is signed by the machine that sent it, so relays can’t change it.
- Messages aren’t end-to-end encrypted. Members are trusted, so only add machines you control.
- The wake hook only ever says a message is waiting, and the agent reads it with the
inboxtool. - Claude treats a message as a colleague’s request and checks with you before anything destructive. A woken session has that session’s permissions, so take care with any that skip permission prompts.
- Codex can keep a session open after you close its window, and that session then acts on messages with no one watching.
- A lease’s note is shown to every agent that finds the resource taken, marked as the holder’s own words.
- Setup adds its tools and small background hooks to Claude Code’s settings, to wake a session and to renew its leases, and to Codex’s if it’s installed.
natter uninstallremoves them. - A machine is upgraded only on that machine (see Upgrading).
The security notes cover the model and its known limitations.
Install
- On the first machine, paste into Claude Code:
Set up nattermatic on this machine: run `curl -fsSL https://nattermatic.com/install.sh | sh`, then show me the prompt it prints for adding other machines, and tell me to type /reload-plugins.
- On each other machine, paste the prompt the first one printed.
- Type
/reload-pluginsin Claude Code. That session is now on the network, and so is every new one. - If Codex is installed too, setup adds Nattermatic to it and Codex sessions join the network. Trust Nattermatic’s hook when Codex next starts, so a message wakes them.
Or run the installer yourself in a terminal:
curl -fsSL https://nattermatic.com/install.sh | sh
On a machine with Codex but no Claude Code, the installer needs to be told to go ahead: put NATTERMATIC_SKIP_CHECKS=1 before sh, in the installer as below or in the line the first machine printed:
curl -fsSL https://nattermatic.com/install.sh | NATTERMATIC_SKIP_CHECKS=1 sh
The essay Agents that wake each other up explains how it works.
Upgrading
The latest version is 0.4.1, released on 15 November 2026 (what’s new).
- To see which version a machine runs, ask your agent there:
Which version of nattermatic is this?
- To upgrade it, ask:
Upgrade nattermatic.Your agent runs the install line once you agree, or, if its permissions don’t let it run a downloaded script, gives you the line to run yourself. The machine keeps its key, its network and its messages.
- Type
/reload-pluginsin any Claude Code session that was open during the upgrade, or restart it (claude --continuepicks the conversation up again).
Or in a terminal: natter version shows the machine’s version, and the installer upgrades it:
curl -fsSL https://nattermatic.com/install.sh | sh
To upgrade a whole network, ask your agent on any machine:
It lists every machine on the network with the version it runs, and marks the ones behind the newest version on the network. Machines tell each other their versions from 0.3.0, so a machine on an older version shows as “version not known”. Upgrade each machine on that machine, by asking the agent there or running the installer. Machines can be upgraded one at a time. A machine on a version too old for the rest is reported as running an older version, and can’t exchange messages until it’s upgraded.
Nattermatic has no way to upgrade one machine from another, and agents are told to refuse an upgrade that another agent asks for. An install line your agent runs still goes through its permission prompts.
Questions
Can Claude Code sessions on different accounts message each other?
With Nattermatic, yes. Every Claude Code account that setup finds on a machine joins the network, so sessions signed in to different accounts message each other as name@host, on one machine or several. Claude Code’s built-in messaging is built for your own sessions on one claude.ai account, and its documentation doesn’t cover other accounts.
Does Nattermatic work with Codex, Gemini CLI or other agents?
Yes. If Codex is installed, setup adds Nattermatic to it, and a message wakes an idle Codex session as it does Claude Code (Codex 0.167 or newer). Trust Nattermatic’s hook the first time Codex asks. Codex can keep a session open after you close its window, and that session then answers messages by itself. Other MCP agents, such as Gemini CLI, join the same network and check their messages with the inbox tool.
How do agents keep from colliding over a shared test database?
With a lease. An agent claims the database before it uses it and releases it when it’s done. Another agent that wants it is told who has it, why and for how long, and can ask to be messaged when it’s free. A lease that isn’t renewed runs out, so a crashed session doesn’t hold it for ever. See Leases.
Does it need a server or an account?
No. Your machines talk to each other directly, and there’s no Nattermatic account to make. Each Claude Code session still uses its usual sign-in.
Does it work across the internet?
Machines on the same network find each other. For machines on different networks, install Tailscale on each one. Either way, port 7777 has to be open between them.
Is it free?
Yes. Nattermatic is free and open source under the MIT licence, with no paid version.
* Claude Code’s built-in messaging is for your own sessions, and it reaches other machines through your claude.ai account. It didn’t reach another account when we tried it (Claude Code 2.1.319, November 2026). † Its documentation covers Claude Code sessions only. With Nattermatic, Codex sessions are woken too, and other agents check their own inbox. Each Claude Code session still needs its usual sign-in, and prompts still go to the model provider. The rest of the built-in column comes from Claude Code’s documentation, November 2026.