Answer prose round 2: the resume prompt and the judge state the finish rule without a second reading

This commit is contained in:
2026-10-03 21:17:17 +02:00
parent d23a2f4837
commit 72ad23f7c2
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -30,8 +30,9 @@ JUDGE_RULES = (
"The chunk is the piece of work the agent is on, shipped as one pull request. " "The chunk is the piece of work the agent is on, shipped as one pull request. "
"finished=true when the chunk is complete: merged, or nothing remains that the agent could do on " "finished=true when the chunk is complete: merged, or nothing remains that the agent could do on "
f"its own. Even then, it is finished only once {ANSWERS_RECORDED}. An answer counts as recorded " f"its own. Even then, it is finished only once {ANSWERS_RECORDED}. An answer counts as recorded "
"where README.md or the records above hold it, or where the transcript shows the agent writing it " "where README.md or the records above hold it, ~/.claude/CLAUDE.md included. It also counts where "
"into one of the places just listed, never ~/.claude/CLAUDE.md. finished=false when work remains that a further run can continue: an open PR, a review " "the transcript shows the agent writing it into one of the places just listed; writing it into "
"~/.claude/CLAUDE.md does not count. finished=false when work remains that a further run can continue: an open PR, a review "
"not yet run, CI not yet reported, an answer not yet recorded." "not yet run, CI not yet reported, an answer not yet recorded."
) )
+1 -1
View File
@@ -43,7 +43,7 @@ def worker_args(task: str, session: Session, model: str, resuming: bool, answere
if answered is not None: if answered is not None:
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)] 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: elif resuming:
start = ["-p", f"Continue the task; the previous run stopped before it was finished. The chunk is finished once it is merged, or nothing remains that you could do on your own, and {ANSWERS_RECORDED}.", "--resume", str(session.id)] start = ["-p", f"Continue the task; the previous run stopped before it was finished. The chunk is finished once it is merged, or nothing remains that you could do on your own. Even then, it is finished only once {ANSWERS_RECORDED}.", "--resume", str(session.id)]
else: else:
# --session-id creates the session under the id loop-claude keeps; --resume continues that session. # --session-id creates the session under the id loop-claude keeps; --resume continues that session.
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)] 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)]
+1 -1
View File
@@ -344,7 +344,7 @@ class Cycles(unittest.TestCase):
self.assertEqual(argument(workers[2], "--session-id"), session) self.assertEqual(argument(workers[2], "--session-id"), session)
self.assertTrue(argument(workers[0], "-p").startswith(f"{TASK}\n\nContinue any open draft PR")) self.assertTrue(argument(workers[0], "-p").startswith(f"{TASK}\n\nContinue any open draft PR"))
self.assertNotIn(TASK, argument(workers[1], "-p")) self.assertNotIn(TASK, argument(workers[1], "-p"))
self.assertIn("The chunk is finished once it is merged, or nothing remains that you could do on your own, and every answer the human typed in it", argument(workers[1], "-p")) self.assertIn("Even then, it is finished only once every answer the human typed in it", argument(workers[1], "-p"))
self.assertEqual({call["cwd"] for call in run.calls}, {str(checkout.root)}) self.assertEqual({call["cwd"] for call in run.calls}, {str(checkout.root)})
self.assertIn("1. Work.", run.calls[1]["stdin"]) self.assertIn("1. Work.", run.calls[1]["stdin"])
self.assertIn("From docs/decisions.md:\n# Decisions\n\nFrom ~/.claude/CLAUDE.md:\n# Global instructions", run.calls[1]["stdin"]) self.assertIn("From docs/decisions.md:\n# Decisions\n\nFrom ~/.claude/CLAUDE.md:\n# Global instructions", run.calls[1]["stdin"])