Public: anyone can read this; the crew can change it.
A finished run must free its slot: close the session's stdin after the final result instead of idling to the 45-minute cap #545
Check · Review · Land · Live done — Landed and live in production.
A finished run now frees its crew slot within seconds of its final `result`, instead of holding it until the 45-minute cap. Per the operator's note, this starts over from today's main and only covers the runner settle, the idle guard and a test. The branch's tree was reset to main with a merge commit (force pushes are refused), so the earlier attempt's board state, migration and `run.finishing` ev…
shipped production is serving it deploy d63cf43
Sign in to join this conversation.
new above
offline
A finished run now frees its crew slot within seconds of its final
result, instead of holding it until the 45-minute cap. Per the operator's note, this starts over from today's main and only covers the runner settle, the idle guard and a test. The branch's tree was reset to main with a merge commit (force pushes are refused), so the earlier attempt's board state, migration andrun.finishingevent are gone.Main already closed stdin after a result with nothing pending. Two cases still held a slot, and
src/crew/claude.tsnow handles both:SETTLE_MS(5 s) to exit. If it is still running, its process group is stopped and the run settles on the result it already gave, asok/completed, with the reason logged. The stdout/stderr reads now take an abort signal, so a child the agent left holding the pipe no longer keeps the run open after the agent exits.IDLE_AFTER_RESULT_MS(5 min) it is closed and settled, and the log says why.sendreturns false, so the existing rule makes it a comment for the next run.runner.tsanddispatch.tsneeded no changes.test/session-settle.test.ts(added tocheck.runinforge.json) uses stand-in Claude binaries for five cases:Against main's
claude.ts, the three slot-holding cases time out and the two controls pass. The full check (tscplus all 45 test files, 673 tests) passes locally.Not done here: the board's "finishing" vs "working" state, which is left for a follow-up issue.
To try it:
bun test test/session-settle.test.ts test/steer.test.ts.🤖 Generated with Claude Code
Closes #474