diff --git a/bin/loop_claude/loop/usage.py b/bin/loop_claude/loop/usage.py index 3c7b3727..eb6c9f26 100644 --- a/bin/loop_claude/loop/usage.py +++ b/bin/loop_claude/loop/usage.py @@ -91,10 +91,11 @@ the UTC time, to lingering-workers.md at the project's folder in that archive A worker can also stall before its result, on a command that hangs. Every 5 minutes without output 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 +chunk-pr or run-heavy doesn't count, but one that holds a heavy slot can. Where such a shell is +found, a headless claude on the project's rung reads every shell's command, processes and output. +The headless claude judges the worker working, waiting on a person or stuck, and names the process +the worker waits on. It judges a shell again only after the shell used CPU and went idle once more. +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).