The code review loops while its background readers work: 18 min of "I keep running commands" #575
Loading…
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?
What happens
In run 204's
agent.code-review, while two background reader subagents were working, the agent spent 17.8 minutes in a loop. It had 102 thoughts that each opened "I keep running commands. Let me stop. I'll end my turn here…", ranecho "waiting"100 times, and wrote "I'll wait for the reader subagents…" 96 times. That came to 121 turns and about 73k output and reasoning tokens. The run still succeeded.Why
Its thoughts show a conflict. It wants to wait by ending its turn, but it reads the brief's "Always end your turn with a short text message" as handing control back, and it doesn't trust that a background report will wake it. So it keeps making a tool call to stay busy.
Fix
Tell the agent, in the brief where it starts background helpers, that ending its turn is how it waits: each report arrives as a new message. If a wait without progress persists anyway, notice it in the engine.
Done when
A replay of run 204's step (
./tools/replay.sh) ends its turn while the readers work, and carries on when their reports arrive.Where to look:
src/osf/pipeline/nodes.py(the end-your-turn rule, around line 1107), the code-review brief.From run 204, 2026-11-20. Related: the code review waiting inside a helper call in run 195, braid#565.