Fix under the floor's Shape: interrupt means only the human, QuotedAnswer names the verdict, one owner for the record files, Limited beside its cycle

This commit is contained in:
2026-10-03 11:33:34 +02:00
parent fdc3bc38d4
commit 2d46aa3b8f
10 changed files with 68 additions and 59 deletions
+5 -4
View File
@@ -1,10 +1,11 @@
from loop_claude.claude_code.entries import assistant_parts, ends_stream, hit_limit, limit_said, parse_entry, rejected_until
from loop_claude.claude_code.session import Session
from loop_claude.claude_code.transcript import part_line
from loop_claude.cycle.verdicts import AnsweredFromRecords
from loop_claude.cycle.limited import Limited
from loop_claude.cycle.verdicts import QuotedAnswer
from loop_claude.effects import Effects
from loop_claude.failure import Failure
from loop_claude.limited import Limited
from loop_claude.project.records import QUOTE_SOURCES
PRINTED_TOOL_INPUT = 160
@@ -38,9 +39,9 @@ def worker_outcome(code: int, result: dict | None, resets: list[int]) -> Failure
return None if result is not None else Failure("claude exited 0 without a result event")
def worker_args(task: str, session: Session, model: str, resuming: bool, answered: AnsweredFromRecords | None = None) -> list[str]:
def worker_args(task: str, session: Session, model: str, resuming: bool, answered: QuotedAnswer | None = None) -> list[str]:
if answered is not None:
start = ["-p", f"Your question: {answered.question}\n\nREADME.md, AGENTS.md or docs/decisions.md answer it:\n\n{answered.answer}\n\nContinue the task.", "--resume", str(session.id)]
start = ["-p", f"Your question: {answered.question}\n\n{QUOTE_SOURCES} answers it:\n\n{answered.answer}\n\nContinue the task.", "--resume", str(session.id)]
elif resuming:
start = ["-p", "Continue the task; the previous run stopped before it was finished.", "--resume", str(session.id)]
else: