Answer the first round: one clock read, the limit's message and time zone on stderr, plainer help and comments

This commit is contained in:
2026-10-02 22:49:39 +02:00
parent e7ff869398
commit 5a481d3ebf
9 changed files with 36 additions and 27 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ import dataclasses
import json
import typing
from loop_claude.claude_code.entries import hit_limit, parse_entry
from loop_claude.claude_code.entries import hit_limit, limit_said, parse_entry
from loop_claude.cycle.retry import retried
from loop_claude.cycle.verdicts import Finished, Interrupt, Unfinished, Verdict
from loop_claude.effects import Effects
@@ -69,9 +69,9 @@ def run_judge(root: str, args: list[str], prompt: str, rendered_transcript: str,
except OSError as failure:
return Failure(f"could not start claude: {failure.strerror}")
reply = parse_entry(proc.stdout) or {}
# The json output names the reset only in prose, such as "resets 7:40pm (Europe/Stockholm)", so the retry polls.
# The json output names the reset only in prose, such as "resets 7:40pm (Europe/Stockholm)", so the judge's limit carries no reset time.
if hit_limit(reply):
return Limited(None)
return Limited(None, limit_said(reply))
if proc.returncode != 0:
return Failure(proc.stderr.strip() or f"the judge exited {proc.returncode}")
verdict = verdict_from(reply.get("structured_output"))