ainb-fleetdaemonlisted
Install: claude install-skill stevengonsalvez/agents-in-a-box
# ainb fleet:daemon
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).
## Run
```bash
ainb fleet daemon # quiet
ainb fleet daemon --verbose # log every detection + send
```
For real background use:
```bash
nohup ainb fleet daemon --verbose > ~/.ainb-fleet.log 2>&1 &
```
## What it does each tick (every 5s)
1. Re-discover all sessions (ainb + peers + jobs, merged + deduped).
2. For each tmux-bearing session: `tmux capture-pane -p -S -80` (last 80 lines).
3. Run the API-error regex set over the buffer.
4. If a match fires AND the (session_id, pattern, snippet-tail) dedupe
key hasn't been seen yet → send `continue` to that session via the
standard route (tmux-first by default — see `AINB_FLEET_TRANSPORT`).
## Detected error patterns
| 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.
## Dedupe key
```
key = (sessi