Name a signal kill, match the judge's retry line, state worker failure in --help
This commit is contained in:
+9
-5
@@ -11,9 +11,10 @@ An unfinished chunk resumes the same session next cycle; a finished one starts a
|
||||
Cycles continue until that interrupt or Ctrl-C. Words: ~/.claude/CLAUDE.md → "Vocabulary".
|
||||
|
||||
Exit 1: no task, not inside a checkout, no premises, claude leaves no transcript, or the worker or
|
||||
the judge fails three times running. A judge fails when its verdict misses a field or quotes nothing
|
||||
in the transcript. Exit 2: the human is needed and stdin or stdout is not a terminal, or the
|
||||
interrupt ended without them typing anything. Rerunning resumes any open session.
|
||||
the judge fails three times running. A worker fails when claude exits non-zero, is killed, or ends
|
||||
without a result event; a judge when its verdict misses a field or quotes nothing in the transcript.
|
||||
Exit 2: the human is needed and stdin or stdout is not a terminal, or the interrupt ended without
|
||||
them typing anything. Rerunning resumes any open session.
|
||||
|
||||
Each project has one session, "A <path> loop-claude", <path> being the checkout relative to ~/code,
|
||||
or to / outside it, deleted when the chunk finishes. Its transcript is archived under
|
||||
@@ -271,7 +272,10 @@ def run_worker(args):
|
||||
for part in event.get("message", {}).get("content", []):
|
||||
if line := said(part, 160):
|
||||
print(line, flush=True)
|
||||
if code := proc.wait():
|
||||
code = proc.wait()
|
||||
if code < 0:
|
||||
return f"claude killed by signal {-code}"
|
||||
if code:
|
||||
return f"claude exited {code}"
|
||||
return "" if done else "claude exited 0 without a result event"
|
||||
|
||||
@@ -386,7 +390,7 @@ def main():
|
||||
failures += 1
|
||||
if failures == 3:
|
||||
sys.exit(f"the worker failed three times running: {failure}")
|
||||
print(f"the worker failed: {failure} - retrying in a minute", file=sys.stderr)
|
||||
print(f"retrying the worker in a minute: {failure}", file=sys.stderr)
|
||||
time.sleep(60)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user