From c8aba30fdb233722755e93b994f6e7fe83596afb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 23:08:13 +0200 Subject: [PATCH] Name the judge's question in its third-failure message, and that a rerun resumes --- bin/loop-claude | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/loop-claude b/bin/loop-claude index 540ae763..1a3770a4 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -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/ 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)