Name the judge's question in its third-failure message, and that a rerun resumes

This commit is contained in:
2026-09-24 23:08:13 +02:00
parent 8397271532
commit c8aba30fdb
+7 -6
View File
@@ -10,9 +10,10 @@ unfinished chunk resumes the same session next cycle; a finished one starts a fr
continue until that interrupt or Ctrl-C.
Exit 1: no task, no premises, claude leaves no transcript, or the worker or the judge fails three
times running; a verdict missing a field or quoting nothing in the transcript is a judge failure.
Exit 2: the human is needed and no terminal is attached, or the interrupt ended without them typing
anything. Before an interrupt every worktree is marked trusted in ~/.claude.json.
times running, a verdict missing a field or quoting nothing in the transcript being a judge failure;
rerunning resumes the session. Exit 2: the human is needed and no terminal is attached, or the
interrupt ended without them typing anything. Before an interrupt every worktree is marked trusted in
~/.claude.json.
Each project has one session, "A ~/code/<path> auto-mode" (the absolute path outside ~/code),
deleted when the chunk finishes. Its transcript is archived under $AUTO_MODE_TRANSCRIPTS (default
@@ -293,12 +294,12 @@ def judge(task, premises, transcript):
if not complete(verdict):
failure = proc.stderr.strip() or "the judge returned no verdict"
elif not grounded(verdict, transcript):
failure = "the judge quoted nothing in the transcript"
failure = f"the judge quoted {verdict['evidence']!r}, nothing in the transcript, asking: {verdict['question']}"
else:
return verdict
if attempt == 2:
sys.exit(f"{failure} - the judge failed three times running")
print(f"{failure} - retrying in a minute", file=sys.stderr)
sys.exit(f"the judge failed three times running: {failure}")
print(f"retrying the judge in a minute: {failure}", file=sys.stderr)
time.sleep(60)