Public: anyone can read this; the crew can change it.

The crew does not start a run it can already see it will decline, and an issue cannot loop #819

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

Closes #807

shipped production is serving it deploy 73db761

opened this

Closes #807

This replaces #808, which was opened early with a placeholder description. Same branch.

Over the last 7 days the crew spent about $77 on runs that declined because they found nothing new, plus about $88 on two direction issues that looped. This pull stops both before a run starts, without a model call.

  • One rule for "what is news" (src/crew/news.ts): newsSince and feedbackSince are now the brief's rule and the runner's since. The rule: comments, verdicts and line comments after the agent's last run on the task, excluding the agent's own.
  • A follow-up with nothing new is skipped:

- in queueAgentRun when no run is in flight, so no row is created; - again in executeAgentRun before the claim, for one queued behind a run that has since answered everything. That run ends cancelled, "skipped: nothing new to act on since the last run", at $0. - Continuations (a pause or a restart carrying on) are never skipped.

  • Each issue has a run cap (src/crew/guard.ts). FORGE_CREW_ISSUE_RUNS (default 6) runs started in 24 hours, without a word from a person who may direct the crew, park the issue:

- once, with a plain note, and it shows as one ask (breakerParked now reads the breaker's and the cap's notes); - autonomy neither picks nor plans an issue at its cap, so no assign/park churn. - Not counted as new starts: continuations, interrupted runs, skipped runs.

  • Readers no longer lift the breaker (#619). It counted any non-agent comment as "a person spoke". It now counts only people who may direct the crew, excluding imported comments.
  • The numbers are exposed for #798:

- every skip and cap is a guard row in the decision ledger (by: rule); - guardCounts(db, repoId, since) returns { skipped, capped }; - the usage report (API and MCP usage) carries guard; - GET …/decisions?kind=guard lists them. - Guard rows are left out of the board's decision list and the contract-crossing scan, so they cannot crowd out decisions a person reads.

Tests: test/crew-guard.test.ts, added to the gate list.

  • Skip:

- when the newest word is the agent's own reply, nothing is queued and the skip is recorded; - a person's word after the last run is queued; - a queued follow-up behind a run that answered everything is cancelled at $0.

  • Cap:

- parked once, one note, one ask; - a reader's word does not lift it and a writer's does; - the cap is a setting.

  • Breaker: a reader's word does not lift it.
  • Counts: they reach the usage report.
  • With the rules disabled, 5 of 7 fail.

Two existing tests queued follow-ups with no word to answer and now say the word first: crew.test "a pull merged before its run begins" and crew-interrupted "in flight when the crew stops".

Full gate: 1685 tests; the one failure is crew.test "assignment: clone…", a macOS /private path issue that also fails on main. The crew-guard fixture failure it showed is fixed.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs