swarm: unguarded claude calls — triage and the healer must ride the limit guard, not redden or go blind on a limit window #253
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#253
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Swarm ops. Evidence from the 2026-07-31 19:50–21:50 limit window (140 weekly-limit + 18 org-spend-limit hits in worker logs). Sibling of #238 (its landed half made the limit marker
matou-swarm-claude-limitdeliberately HOST-GLOBAL — one host, one subscription); distinct from #250 (code sync).What's true today
limit-lib.shguards the swarm workers (the 2026-07-29 storm fix). Two callers never got it:run-triage.sh— a baretimeout 2700 claude -p "/triage …"underset -euo pipefail. Any limit refusal reddens the whole triage run; two blips within the watchdog window mint an always-red incident (exactly what happened on the matou-app side at 19:51/19:55 — healer escalation confirmed moot after recovery, but the mechanism stands for THIS repo too).heal.sh's healer agent call — during the same window the healer's own claude died silently (agent-out.log= 0 bytes in the 2026-08-01T00:01 incident dir): the healer goes blind precisely when the swarm most needs diagnosis, and burns healer-ledger attempts on non-incidents.What to build
matou-swarm-claude-limitmarker before invoking claude (marker fresh → yield cleanly: triage exits 0 with a "limit-parked" note, the healer defers the incident — ledger attempt NOT consumed), and classify a limit refusal after a failed call (recognize via limit-lib's signatures, write the global marker, exit clean) so the first hit parks the host for every caller, not just workers.limit-lib.sh(already byte-identical across repos) or a small sharedclaude-guard.sh— either way inside the #250 manifest set, so the matou-app mirror arrives by whatever layout ruling #238 lands, not by hand.Acceptance criteria
Task manifest
Landed on
origin/mainas76162f0.Both unguarded claude callers now ride the host-global
matou-swarm-claude-limitmarker via two shared helpers inlimit-lib.sh(claude_limit_parked/claude_limit_park, on the #250 harness-manifest so the matou-app mirror arrives by sync, not by hand):limit-parkedlog line, no blind refusing call → no always-red incident), and CLASSIFIES a limit refusal after a failed call (capture viatee;claude_limit_hit→ park + exit clean; any other failure still reddens through the verdict EXIT trap). AC1, AC2.gather_evidencedefers a fresh-marker window (writesdeferred: limit windowto the evidence dir, consumes NO ledger attempt — the ledger is only touched past the gate), and the existing post-call limit branch now parks the host + records the deferral (the 2026-08-01 0-byteagent-out.logblind-healer incident). AC3.Evidence: new offline seam
tests/claude-call-guards-test.sh(7 groups) drives BOTH real scripts with a fake claude/agent emitting limit signatures across the marker fresh/stale/absent matrix;tests/limit-lib-test.shgains the marker matrix. All existing.sandcastletests (limit-lib, heal, heal-lib, swarm-lock-yield, preflight, sync-harness) stay green.Out of scope as filed: raising the org spend limit (billing), the matou-app run-triage caller wiring (rides #238/#250), workflow lock semantics (#238 landed half).