← ClaudeAtlas

ainb-fleetdaemonlisted

Long-running watcher that scans every claude session every 5s and auto-sends `continue` to any session whose recent tmux pane buffer matches a known API-error regex (rate_limited, overloaded_error, internal_server_error, request_timeout, socket_hang_up, fetch_failed, ECONNRESET). Use this when you want unattended recovery from transient API failures across the fleet.
stevengonsalvez/agents-in-a-box · ★ 16 · AI & Automation · score 77
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