/ainb-fleet:daemonfrom ainb-fleet
Background watcher that scans Claude sessions every 5s and auto-sends `continue` to sessions hitting transient API errors. For unattended recovery across a fleet. Deprecated in favor of ATC lite mode.
Ships in ainb-fleet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
DEPRECATED. Use
/ainb-fleet:atcinlitemode.ainb fleet atc mode <name> --set litegives you this exact loop — the same 5-second scan, the same auto-continueon the same known transient errors — owned by the ATC supervisor, inside its per-session retry cap and its safety ledger, and structurally unable to run beside the LLM heartbeat.This standalone daemon REFUSES to start while ATC owns the fleet in EITHER mode, because both send the same auto-
continueto the same pane and each de-dups only inside its own process, so the pane gets it twice. Pass--force-raceto run both anyway.The difference that matters is the retry cap: ATC gives up on a session after a bounded number of attempts and escalates to you. This daemon has no cap, so a session that keeps failing is retried forever, and running it beside ATC makes ATC's cap meaningless.
Kept for unmanaged one-off recovery, not removed.
Superseded by
/ainb-fleet:atcfor managed fleets. ATC absorbs this daemon's job — its ERR playbook does the same auto-continue, but with a per-session retry cap + escalate-on-exhaustion that this daemon lacks (see the sharp edge below). Preferainb fleet atc setup <name>for unattended supervision. The daemon stays for unmanaged one-off recovery; do not run it against sessions an ATC instance already manages — they race.
Background watcher. Reads each session's tmux pane (capture-pane) and
auto-continues sessions hitting API errors via tmux send-keys. It does
not register as a peer — it is purely tmux-driven (broker health is
checked only to print an informational line).
ainb fleet daemon # quiet
ainb fleet daemon --verbose # log every detection + send
For real background use:
nohup ainb fleet daemon --verbose > ~/.ainb-fleet.log 2>&1 &
tmux capture-pane -p -S -80 (last 80 lines).continue to that session via the
standard route (tmux-first by default — see AINB_FLEET_TRANSPORT).| name | regex |
|---|---|
rate_limited | \brate[_ ]limited\b |
overloaded | \boverloaded_error\b | \bModel is overloaded\b |
internal_server_error | \binternal_server_error\b |
request_timeout | \brequest timed out\b |
socket_hang_up | \bsocket hang up\b |
fetch_failed | \bAPI Error\b | \bfetch failed\b |
connection_reset | \bECONNRESET\b | \bconnection reset\b |
Case-insensitive. Word-boundaried to avoid false positives.
key = (session_id, pattern_name, last_40_chars_of_match_context)
Within a single daemon run, the same key only fires continue once.
This prevents spam when the error text scrolls up but is still in the
buffer.
If a session is permanently broken (wrong credentials, model deprecated,
loop bug), the daemon will keep firing continue forever as new errors
match new dedupe keys. Watch the daemon log; kill it (Ctrl-C or
kill <pid>) when you see runaway repetition.
Roadmap: per-session retry cap with exponential backoff.
# foreground: Ctrl-C
# background:
pkill -INT -f "ainb fleet daemon"
# or kill by exact PID if you know it
kill <pid>
The daemon holds no broker registration, so there is no stale peer entry to
clean up on exit — Ctrl-C / kill is enough.
On start the daemon prints whether the broker is reachable (informational only — writes go via tmux regardless):
[fleet/daemon] broker healthy at 127.0.0.1:7899
# or, when the broker is down:
[fleet/daemon] broker not reachable — operating in tmux-only mode
With --verbose, every detection also prints:
[fleet/daemon] auto-continue -> <tmux_session> (<pattern>)
Tail the nohup log to watch in real time:
tail -F ~/.ainb-fleet.log
continue while you're
reading the error, racing your investigation.tmux-first it can only
reach such a session if it still has a healthy broker peer.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub stevengonsalvez/agents-in-a-box --plugin ainb-fleet12 skills in this plugin
/ainb-fleetFleet orchestration overview — the `ainb fleet ...` Rust subcommand
namespace for driving every claude session on the host. Routes to the
sub-skills (ainb-spawn / standup / broadcast / sequence / needs / daemon / atc).
Invoke this for an at-a-glance map of what fleet can do; reach for the
specific sub-skill for the verb you want.
/ainb-spawnainb-fleet:ainb-spawnSpawn a coding-agent session correctly with `ainb run`: always into a git
worktree, never bare into a plain checkout. Use whenever you are about to
start a Claude/Codex/Gemini/Copilot session in a terminal. Guards the
invocations that silently produce a `(broken)` workspace row, two agents
sharing one working tree, a `--parent` flag that never fires, or a teardown
that cancels itself and leaks the session.
/atcOther plugins' skills for the same job