Answer the stability and product passes: print each records answer, name its question, drop a misquote to an interrupt, budget the whole prompt
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
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.effects import Effects
|
||||
from loop_claude.failure import Failure
|
||||
from loop_claude.limited import Limited
|
||||
@@ -37,10 +38,11 @@ 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, answer: str | None = None) -> list[str]:
|
||||
if resuming:
|
||||
prompt = f"README.md or the project's records answer your question:\n\n{answer}\n\nContinue the task." if answer is not None else "Continue the task; the previous run stopped before it was finished."
|
||||
start = ["-p", prompt, "--resume", str(session.id)]
|
||||
def worker_args(task: str, session: Session, model: str, resuming: bool, answered: AnsweredFromRecords | None = None) -> list[str]:
|
||||
if answered is not None:
|
||||
start = ["-p", f"Your question: {answered.question}\n\nREADME.md or the project's records answer 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:
|
||||
start = ["-p", f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.", "--name", session.name, "--session-id", str(session.id)]
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user