Move loop-claude's cycle, judge, interrupt, tmux and routing into agent_cycle
CI / tests (pull_request) Failing after 3m50s

This commit is contained in:
2026-11-18 16:21:35 +01:00
parent 2c5406ab38
commit 54fc339fb0
45 changed files with 348 additions and 237 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ claude session is named "A <key> loop-claude <window>", so a rerun resumes a chu
deleted when the chunk finishes. A fresh worker is told the items the project's other chunks hold,
running or stopped: each one's own and those on its latest `Chunk items:` line, and leaves them out.
A question only the human can answer is an interrupt (bin/loop_claude/cycle/interrupt.py).
A question only the human can answer is an interrupt (bin/agent_cycle/interrupt.py).
loop-claude prints the question in the chunk's window and rings its bell. Until it is answered the
window's name ends in " ?", as in "item-372 ?", which tmux's status bar shows. The human answers it
there:
@@ -82,7 +82,7 @@ Before each worker starts, loop-claude waits until at least a quarter of the mac
available (bin/machine_load/memory.py).
Each worker's claude, the session /talk opens and the subagents either launches run with a 200k
auto-compact window (CLAUDE_CODE_AUTO_COMPACT_WINDOW, bin/loop_claude/cycle/worker.py), so each
auto-compact window (CLAUDE_CODE_AUTO_COMPACT_WINDOW, bin/agent_cycle/worker.py), so each
compacts its context at about 170k tokens. They also save a Bash result of more than 6,000
characters to a file and see its path and the first 2,000 characters (BASH_MAX_OUTPUT_LENGTH,
bin/claude_code/output_limits.py).
@@ -101,7 +101,7 @@ models on another; a chunk no item routes runs on the project's model. The worke
rungs it launches its reviews on. The worker's rung steps up as a chunk stays unfinished, when the
worker names on its `Chunk items:` line an item that picks a higher rung, or when the judge finds
in the transcript an escalation trigger that fired and the worker asked for a higher rung. The
rules are in bin/loop_claude/routing.py and bin/model_routing/ladder.py, the choice of
rules are in bin/agent_cycle/routing.py and bin/model_routing/ladder.py, the choice of
each review's rung in bin/model_routing/review_choice.py, and the prompts' wording in
bin/loop_claude/cycle/prompts.py. Each verdict, interrupt, quoted answer, stop and
step-up in the archive ends with a Worker: line, the route as JSON (Route.worker_line in