Documentation
Troubleshooting
Start with the tool that knows:
agent-bridge pair --check before pairing,
agent-bridge <peer> doctor after (inside the
project). Each prints one line per check with the fix.
agent-bridge peers shows which peers answer right now, and
why the others don't.
Installing and running
agent-bridge: command not foundin a terminal. Open a new terminal window: the PATH line is read when a terminal starts. Still missing? No Claude Code session has started since the plugin was installed (the session puts the command in place), or you turned that off withinstall-cli --uninstall: runagent-bridge install-cli(Install) through Claude, or the full pathagent-bridge configprints underplugin:.agent-bridge install-cli --statusandpair --checksay what's missing.agent-bridge: no plugin at .../current/bin/agent-bridge. The plugin moved (an update, a reinstall) and no Claude Code session has started since to point the link at its new folder: start one, or runagent-bridge install-cliagain from the plugin.jq is needed(Linux, or macOS before 15): install jq with your package manager (brew install jqon older macOS). Without it the plugin's monitor stays silent instead of failing.unknown operation '...' (client and peer versions differ?). The two machines run different versions of the plugin: update both.
Pairing
pairdoesn't see the other machine. Both must run it within the same 5 minutes, on the same LAN segment, with mDNS (UDP 5353) allowed between them. On Windows the network must be Private, or the firewall drops it (pair --checksays so). Linux needsavahi-utils(or PowerShell 7).agent-bridge discovershows what this machine sees. Guest Wi-Fi and some mesh or enterprise networks isolate clients from each other: try a cable, or set the link up by hand.- "more than one machine is pairing": name the one
you want,
agent-bridge pair <name>. - The codes differ, or "the code entered isn't this
machine's". Stop. Something else answered, or one side
restarted; run
pairagain on both. Nothing was written on a side that refused. - No window with this machine's code appeared
(pairing from Claude Code). There's no desktop session to show it on (an
SSH login, a headless machine), or the window opened behind others. Run
agent-bridge pairin a terminal on that machine instead;pair --checkwarns about a missing desktop. - "no terminal or desktop here to ask the owner".
Same cause: run
agent-bridge pair --confirmin a terminal on that machine. - "the owner was shown that ... would be let in from ..., but this pairing lets it in from ...". The pairing's state file changed while the dialog was open, so what you were shown isn't what would have been applied. Nothing was written; pair again.
sshd: NOT updated. The owner runs, on this machine: .... The password prompt was cancelled, or none could be shown, or the setup script failed. On Windows the reason is in brackets after "NOT updated" (the elevated window closes when it ends, so pairing keeps its transcript in the pairing state folder,sshd.log). Run the command it names (sudo, or an elevated PowerShell 7 on Windows) on that machine.Half paired: this machine reaches <peer>, but <peer> can't reach this machine yet.The link check only runs from this machine to the other one; when this machine's sshd wasn't updated, the other one still can't log in here.pairexits with 1 and prints the command that finishes it. Run that, thenagent-bridge <peer> doctoron the other machine.sshd: lets <user> in already (...); to add the hardening .... Nothing keeps the peer out (the server doesn't limit who logs in); only the extra hardening for these logins is missing. Run the command when you can.sshd: allows ..., but Remote Login is off(macOS). Turning Remote Login on needs Full Disk Access for the terminal on recent macOS. Turn it on in System Settings > General > Sharing > Remote Login (leave "Allow full disk access for remote users" off). On Linux: "nothing listens on port 22": start the SSH server (sudo systemctl enable --now ssh, orsshd).link=unknown: <peer> didn't confirm in time. This side finished; the other didn't say so in time (its owner was slow at its prompt, or it was refused there).agent-bridge <peer> pingshows whether the link works; if not, pair again on both.- "Paired, but
doesn't answer over SSH yet". Look at the other machine'ssshd:line: its SSH server isn't letting this one in yet. On Windows, check the network is Private. - "... starts with ... and a dash: job folders could
collide". Two machines' names overlap (
buildandbuild-2): rename one ("self"in itspeers.json).
The link
- "doesn't answer" / timed out. The peer is asleep or
off, off the LAN, or its firewall drops your address. A running job
keeps the peer awake; between jobs it may sleep (
doctorshows the peer's sleep settings). Wake it; Wake-on-LAN isn't part of agent-bridge. - Your address is outside what the peer accepts: it fails
closed.
Permission denied (publickey)(the key'sfrom=) or a timeout (the Windows firewall);doctorsays "this machine's addresses aren't the onesaccepts". Pair again and choose the whole network at the confirm prompt, or have the owner rerun the peer's setup script with the new addresses or network. Never change a peer's allow lists from an agent session. - The peer moved to a new address. With an mDNS or
DNS name, the link follows it by itself. If the name doesn't resolve,
the last address that worked, then the address the peer announces (with
advertise), thenaddressesare tried. With the host key pinned under the alias (pairing does this), the pin holds at any address. Host key verification failed. The peer was reinstalled, or another machine now answers at its address. Don't remove the pin. Compare the fingerprint on the peer itself (ssh-keygen -lfof its host key; the setup scripts print it), and only then pair again (or replace the line inknown_hosts).doctor: "no clone of '' found on Clone the project there (in one of the usual source folders), or set". "repos": {"<project>": "<path>"}for that peer; with several clones,agent-bridge <peer> locate-repo --save <path>.doctor: "doesn't ignore .claude/worktrees/". Add.claude/worktrees/to that clone's.gitignoreor.git/info/exclude, so job worktrees don't show in its owner'sgit status.- The clocks differ (
doctorwarns past 2 minutes): message ages and timeouts will be off; fix the time on the machine that's wrong.
Jobs and sync
sync/donerefuse "commits you haven't fetched".fetch <job>first, or--forceto drop them (say so to the owner first).git fetch from the bundle failed. The peer lost a commit it listed while the bundle was on its way (a branch deleted meanwhile): sync again.- The peer can't fetch from the remote (its
credential helper or keychain needs the owner's desktop session).
Nothing needs it to:
syncsends what the peer lacks, andupdate-checkoutbrings the owner's checkout there up to the remote's default branch. - A step says
crashed:. A test binary was killed by a signal (or a Windows status), so its results are missing: read that step's log first (logs <job> --step N). - Exit 65: an
--expected output is missing. 125: the job ended without an exit code (the machine went down?). 143: it was stopped. 255: the SSH link failed (one line says why). - Background jobs die at logout on Linux.
loginctl enable-linger <user>(the owner's OK).
Messages
- "queued" (exit 75). The peer is unreachable; the
message goes with the next
msg,exchange,watchorwait-reply, or when the other side pulls it. - A message is missing, or something is in
rejected/orrefused/. A message must come from the machine that delivered it, be for this machine and look like a message;rejected.log(what arrived here) andrefused.log(what another machine wouldn't take from here) have the reason. Most often a name mismatch: the name one machine uses for another must be that machine's ownself, everywhere (doctorwarns about it). - "this repository tracks files under
.claude/agent-bridge/". The mailbox is made on each machine and
never comes from a repository, so one that is committed isn't used. Look
at those files (
git ls-files .claude/agent-bridge); if the repository is yours, stop tracking the folder. - "its answer isn't one agent-bridge asks for". A
peer answered
ping,doctororcleanwith something that isn't the number or name expected. Nothing was done with it. Check that machine (agent-bridge <peer> doctor), and whatdateand its shell's startup files do there. - "has no clone of '
' yet". The peer has no repository for this project, so there is no mailbox there: clone it on the peer (agent-bridge <peer> locate-repofinds it afterwards). Queued messages go once it exists. - "
takes only messages from this machine". That machine paired with--messages-only: its agents and yours can talk (msg,task,sessions,wait-idle,ping), and jobs,sync,runand the rest are refused there whatever is sent. If a command fails with it before"link": "messages"is in your config, runagent-bridge <peer> pingonce: it notes that. Its owner changes it there withpair <this machine> --limit full; then remove"link"from that peer's entry here. - Done messages arrive late. They wait in the peer's
outbox until this machine takes them: within a second or two while a
session's
watchruns (a long poll), otherwise at the next exchange,wait-replyortask wait. A peer on agent-bridge before 0.8 doesn't hold the poll: it is asked every 15 s (agent-bridge updatethere). doctorsays the key exchange is classical. One side's OpenSSH has no post-quantum exchange (older than 9.0, or Windows' built-in 9.5). The link is still encrypted and authenticated. To get one: on macOS and Linux, the system's OpenSSH 9.0 or later has it; on Windows, install OpenSSH from Microsoft's release (winget install Microsoft.OpenSSH.Preview), which agent-bridge then prefers over the built-in one."require_pq": truefor a peer refuses anything else.
Windows
- The network is Public. Windows blocks mDNS and incoming SSH there: make it Private (Settings > Network & internet > your network > Private network).
- The setup script fails at once in "Windows
PowerShell". It needs PowerShell 7.4+: open "PowerShell 7" as
administrator (not "Windows PowerShell"), or
winget install Microsoft.PowerShellfirst. - os error 1455 ("The paging file is too small"),
then odd internal compiler errors: a many-core machine can run out of
commit memory with parallel compilers and linkers. Cap parallel build
jobs with
jobsin the peer config. - Windows hibernates after a while even on AC power
(
doctorshows the idle timeouts). Jobs prevent it while they run; between jobs, expect the machine to be gone. Change the power plan only if the owner wants to. - CRLF. With
core.autocrlf=truefiles check out with CRLF; tests that compare committed files byte for byte need-textin.gitattributes(doctorwarns). - It hangs. Windows
ssh.execan't connect out from inside an SSH session to that same machine; the Windows client refuses there with one line. Jobs start outside the session, so a job may use the client. - "Windows has marked the sshd service for deletion",
or
Start-Service sshdfails with "disabled or no enabled devices" while sshd is running. Two OpenSSH servers can claim the onesshdservice: Windows' own (Optional features,C:\Windows\System32\OpenSSH) and the MSI or winget one (C:\Program Files\OpenSSH). When Windows' install waits for a reboot (Get-WindowsCapability -Online -Name OpenSSH.Server*saysInstallPending), the running service is marked for deletion: it can't be started, and it's gone once it stops. The setup script then changes nothing rather than restart it. Keep one of the two: restart Windows and checkGet-Service sshd, or remove the one you don't use (Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0, or uninstall the MSI), then run the setup script again. unpairsays "sshd: NOT updated". An administrator's keys are inadministrators_authorized_keys, which only an elevated PowerShell may change, and the UAC prompt wasn't approved: run the command it prints, in an elevated PowerShell 7 (setup/enable-ssh-windows.ps1 -Remove 'agent-bridge <peer> to <this machine>'). Until then the peer's key still lets it in.pairorpair --checksays the SSH host key isn't readable. The OpenSSH installer lets only elevated administrators read even the public half; when the server is running, pairing asks it on the loopback instead. Otherwise run the setup script once (elevated): it makes the public key readable.- "... is not properly encoded", or "'pwsh' is not
recognized", from a Windows peer. Its SSH shell is still
cmd.exe: run the setup script there (it makes PowerShell 7 the SSH shell), or set it yourself:New-ItemProperty HKLM:\SOFTWARE\OpenSSH -Name DefaultShell -Value (Get-Command pwsh).Source -Force. - A firewall prompt for PowerShell when pairing or
advertising: allow it on Private networks. Answering "Block" (or
cancelling) leaves Block rules for
pwsh.exe, which win over the setup script's rule: remove them inwf.msc(Inbound Rules, "PowerShell 7"). - ssh works in a terminal but agent-bridge says "Permission
denied". agent-bridge runs the Windows OpenSSH client, not
Git's own
ssh(which Git Bash finds first): a key that only Git'sssh-agentholds isn't seen. Add it to Windows' agent (ssh-add, with thessh-agentservice running), or give the key no passphrase.