Run a chunk's worker on the rung its item picks, below the project's too, with its reviewers kept on the project's rung

This commit is contained in:
2026-10-14 23:50:39 +02:00
parent 8f7b0c5ac7
commit b4e7dd9875
9 changed files with 52 additions and 31 deletions
+4 -1
View File
@@ -16,6 +16,7 @@ from claude_code.transcript import read_transcript, render
from loop_claude.cycle.retry import retried
from loop_claude.routing import Route
from loop_claude.cycle.worker import run_worker, worker_args
from model_routing.ladder import Rung
from loop_claude.stop import Stop
@@ -31,6 +32,8 @@ class Cycle:
session: Session
task: str
route: Route
# The project's rung; None for a model off the ladder.
anchor: Rung | None
# Empty when the previous cycle's verdict was not Unfinished.
unfinished_evidence: str
@@ -86,7 +89,7 @@ def worker_start(cycle: Cycle, answered: QuotedAnswer | None) -> list[str]:
return worker_args(cycle.session, cycle.route.rung, prompts.answered(answered.question, answered.answer), resume=True)
if session_open(cycle.session):
return worker_args(cycle.session, cycle.route.rung, prompts.resumed(cycle.unfinished_evidence), resume=True)
return worker_args(cycle.session, cycle.route.rung, prompts.fresh(cycle.task, cycle.premises, cycle.route), resume=False)
return worker_args(cycle.session, cycle.route.rung, prompts.fresh(cycle.task, cycle.premises, cycle.route, cycle.anchor), resume=False)
def keep_answer(cycle: Cycle, answered: QuotedAnswer) -> Stop | None: