Answer the first round: resume the worker with the records' answer to its question, read docs/decisions.md alone, scope --help's promise

This commit is contained in:
2026-10-03 00:35:40 +02:00
parent 6d5d19bd69
commit 6340e5a993
11 changed files with 100 additions and 54 deletions
+3 -2
View File
@@ -37,9 +37,10 @@ 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) -> list[str]:
def worker_args(task: str, session: Session, model: str, resuming: bool, answer: str | None = None) -> list[str]:
if resuming:
start = ["-p", "Continue the task; the previous run stopped before it was finished.", "--resume", str(session.id)]
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)]
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 [