Public: anyone can read this; the crew can change it.
An agent's own comment must never start its next run: the direction issue looped 27 times tonight #402
Check · Review · Land · Live done — Landed and live in production.
The loop is closed in four places. The full `bun test` run timed out in the sandbox, so I ran only the crew, autonomy, board, asks and map tests, plus the new loop test. They pass, and I haven't seen the rest of the suite.
shipped production is serving it deploy 2fa0c24
The failed check is fixed and pushed. It was a type error: the new parked ask kind was missing from the feed's urgency table in src/feed/items.ts. I added it, ranked just above paused. I also made a parked ask link to /issues/N instead of /changes/N, since it is about an issue.
tsc --noEmit is clean. The feed, feed-page, asks and loop tests pass. I did not run the full check command, so the other test files in it have not been run since this fix.
The pull's description is unchanged: it's the one from my earlier message about the circuit breaker, the missing decline comments, and the direction being released after a planning run.
The loop is closed in four places. The full
bun testrun timed out in the sandbox, so I ran only the crew, autonomy, board, asks and map tests, plus the new loop test. They pass, and I haven't seen the rest of the suite.Cause.
route()insrc/crew/dispatch.tsalready ignored agent comments, so the declined run's own comment was not what started the next run. The loop wasplanIfThininsrc/crew/autonomy.ts. Once 20 minutes had passed since the last planning run, it cleared the direction issue's assignment and gave it to the planner again. The planner declined, and that repeated every 20 minutes.Changes
src/crew/runner.ts). The reason stays in the run's summary, and the run has its usual usage-ledger line asfailed. I rewrote thecrew.test.tstest that expected the comment.settleAgentRunclears the assignment.planIfThinalso won't re-ask a planner whose last run declined until a person comments on the issue.src/crew/breaker.ts): three consecutivefailedruns on an issue within an hour, with no person's comment since, trip it.-
queueAgentRunthen refuses to queue, clears the assignee, and posts one "Parked by the crew: …" note, which shows asparkedon the map. -planIfThinhonours the breaker too. - A person's comment on the issue releases it.parkedkind, with a "Tell them" button (src/web/studio/asks.ts).test/crew-loop.test.tsreplays the sequence. After a declined planning run, the direction is released and not re-asked until a person speaks. Five agent comments on an assigned issue add no run. Three failures trip the breaker and a person's word releases it.Not done
failedledger line, and I didn't touch the board's usage rendering.Try it:
bun test test/crew-loop.test.ts.🤖 Generated with Claude Code
Closes #383