Judge a worker that stalls before its result with a headless claude, and report the verdict without a kill #633

Merged
lilleman merged 15 commits from item-422 into main 2026-11-19 10:32:53 +01:00
Showing only changes of commit bfcff168c2 - Show all commits
+8 -6
View File
@@ -89,12 +89,14 @@ the UTC time, to lingering-workers.md at the project's folder in that archive
(bin/agent_cycle/lingering_workers.py).
A worker can also stall before its result, on a command that hangs. Every 5 minutes without output
from its claude, where a shell has used no CPU since the last check and written nothing for 3
minutes, or has run over 4 hours, and runs no chunk-pr or run-heavy, a headless claude on the
project's rung reads the shells' commands, processes and output. It judges the worker working,
waiting on a person or stuck, and names the process that holds it. loop-claude prints the verdict
with its evidence and appends it to stuck-workers.md beside lingering-workers.md. It kills nothing
yet (bin/agent_cycle/stuck_workers.py).
from its claude, loop-claude looks for a shell that may be stuck: one that used no CPU since the
last check and wrote no output for 3 minutes, or one that has run over 4 hours. A shell that runs
chunk-pr or run-heavy doesn't count, but one that holds a heavy slot does. Where a shell not judged
before counts, a headless claude on the project's rung reads every shell's command, processes and
output. It judges the worker working, waiting on a person or stuck, and names the process it waits
on. loop-claude prints the verdict and the shells that showed a sign, and appends them to
stuck-workers.md beside lingering-workers.md. It doesn't kill anything yet
(bin/agent_cycle/stuck_workers.py).
Before each worker starts, loop-claude waits until at least a quarter of the machine's memory is
available (bin/machine_load/memory.py).