Account sync for coding agents on every machine

Swap accounts on your laptop with cswap, /login or codex login. Sessions on your agent VM, build box and herdr remote switch on their next request.

Open source, MIT or Apache-2.0. Pairing takes one 10-minute ticket.

Every machine and the account it runs as

The main machine is the source; every other machine follows it. agentferry status on any of them shows the account, the token and the harnesses. See how pairing works

Pairing

Pair a machine with one ticket

agentferry pair prints a ticket that lasts 10 minutes and works once. Run agentferry follow with it on the other machine; from then on the two know each other by key.

See what crosses

The account and tokens each machine gets

  • Account choice

    Which account the main machine uses, until you swap.

    Sent
  • Live access token

    Full scope, renewed while the main machine is up.

    Hours, renewed
  • Standing token

    Optional: one per account, so followers keep going with the laptop off.

    If you add one
  • Refresh token

    It stays on the main machine.

    Never sent
  • MCP sign-ins

    Each machine keeps its own.

    Never sent

Refresh tokens stay ashore.

A refresh token rotates on every use. Two machines sharing one log each other out, and reuse can revoke the session everywhere. agentferry never sends it.

One pairing carries every harness. Claude Code and Codex are built in.

Follows Claude Code logins

Reads the macOS Keychain or the Linux credentials file. Sessions switch on their next request.

  • BBbuild-box now on gmailClaude Code, on its next request
  • AVagent-vm now on gmailClaude Code, session kept running

Follows the Codex login

Sends the ChatGPT login, never its refresh token. Live swapping is still being verified.

Follows pi and other coding agents

A file adapter, set up in settings, follows any harness whose login is a JSON file.

Four network paths, the best one picked for you

Built on Iroh: QUIC, an ed25519 key per install, encrypted end to end. A tailnet is one more path, and no VPN is needed. Relays only forward ciphertext.

Only paired machines connect

  • Owner-only files

    Followers keep what they hold in files only your user can read.

  • Generation numbers

    Every message carries one; a follower ignores anything older.

  • Unpair deletes

    agentferry unpair tells the machine to delete what it holds.

  • Revocable tokens

    Revoke a standing token on claude.ai at any time.

Questions

What if the main machine is off?

Followers keep working on each account’s standing token. An account without one works only while the main machine is up.

Do my machines need Tailscale or a VPN?

No. Machines meet on the same network, across the internet or through a relay. A tailnet is one more path.

Is there a Claude Code plugin for agentferry?

Yes: /agentferry status, /agentferry follow and a SessionStart hook, so no session starts on stale credentials.

Does Codex switch accounts live?

Codex is built in and follows the ChatGPT login. Its live behaviour is still being verified.

How does agentferry run on each machine?

agentferry service install sets it up as a launchd or systemd user service on each machine.

Does my provider allow several machines?

Check its terms on machines and concurrent sessions before you pair.