From 8f34915bb83c7b54242e74715fbcc79774e4bc62 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 28 Sep 2026 21:24:10 +0200 Subject: [PATCH] Name the retry helper's and the judge's message reason --- bin/loop_claude/judge.py | 8 ++++---- bin/loop_claude/retry.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/loop_claude/judge.py b/bin/loop_claude/judge.py index 38d402a1..943586ad 100644 --- a/bin/loop_claude/judge.py +++ b/bin/loop_claude/judge.py @@ -53,14 +53,14 @@ def judge(root, task, premises, transcript, model): for failures in itertools.count(1): verdict = run_judge(root, args, prompt) if isinstance(verdict, Failure): - failure = verdict.reason + reason = verdict.reason elif reason := incomplete(verdict): - failure = reason + pass elif not grounded(verdict, transcript): - failure = f"the judge quoted {verdict['evidence']!r}, nothing in the transcript" + (f", for the question: {verdict['question']}" if verdict["interrupt"] else "") + reason = f"the judge quoted {verdict['evidence']!r}, nothing in the transcript" + (f", for the question: {verdict['question']}" if verdict["interrupt"] else "") else: return verdict - if stop := stop_or_sleep_a_minute("judge", failures, failure): + if stop := stop_or_sleep_a_minute("judge", failures, reason): return stop diff --git a/bin/loop_claude/retry.py b/bin/loop_claude/retry.py index ab5c1a8e..f377899d 100644 --- a/bin/loop_claude/retry.py +++ b/bin/loop_claude/retry.py @@ -4,8 +4,8 @@ import time from loop_claude.outcome import Stop -def stop_or_sleep_a_minute(who, failures, failure): +def stop_or_sleep_a_minute(who, failures, reason): if failures == 3: - return Stop(1, f"the {who} failed three times running: {failure}") - print(f"retrying the {who} in a minute: {failure}", file=sys.stderr) + return Stop(1, f"the {who} failed three times running: {reason}") + print(f"retrying the {who} in a minute: {reason}", file=sys.stderr) time.sleep(60)