Name the judge's question in its third-failure message, and that a rerun resumes
This commit is contained in:
+7
-6
@@ -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.
|
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
|
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.
|
times running, a verdict missing a field or quoting nothing in the transcript being a judge failure;
|
||||||
Exit 2: the human is needed and no terminal is attached, or the interrupt ended without them typing
|
rerunning resumes the session. Exit 2: the human is needed and no terminal is attached, or the
|
||||||
anything. Before an interrupt every worktree is marked trusted in ~/.claude.json.
|
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),
|
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
|
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):
|
if not complete(verdict):
|
||||||
failure = proc.stderr.strip() or "the judge returned no verdict"
|
failure = proc.stderr.strip() or "the judge returned no verdict"
|
||||||
elif not grounded(verdict, transcript):
|
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:
|
else:
|
||||||
return verdict
|
return verdict
|
||||||
if attempt == 2:
|
if attempt == 2:
|
||||||
sys.exit(f"{failure} - the judge failed three times running")
|
sys.exit(f"the judge failed three times running: {failure}")
|
||||||
print(f"{failure} - retrying in a minute", file=sys.stderr)
|
print(f"retrying the judge in a minute: {failure}", file=sys.stderr)
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user