Name the stream that is not a terminal, and the rerun after exit 2
This commit is contained in:
+5
-6
@@ -10,10 +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 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.
|
||||
times running, a verdict missing a field or quoting nothing in the transcript being a judge failure.
|
||||
Exit 2: the human is needed and stdin or stdout is not a terminal, or the interrupt ended without
|
||||
them typing anything. Rerunning resumes the session after either. 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),
|
||||
deleted when the chunk finishes. Its transcript is archived under $AUTO_MODE_TRANSCRIPTS (default
|
||||
@@ -134,7 +134,6 @@ def end_session(path):
|
||||
|
||||
|
||||
def session_open(session_id):
|
||||
"""The transcript outlives its cycle until end_session removes it: present means the chunk is unfinished."""
|
||||
return bool(session_file(session_id))
|
||||
|
||||
|
||||
@@ -311,7 +310,7 @@ def judge(task, premises, transcript):
|
||||
def interrupt(session_id, path, question):
|
||||
print(f"\n{question}", file=sys.stderr)
|
||||
if not (sys.stdin.isatty() and sys.stdout.isatty()):
|
||||
return "the human is needed and no terminal is attached"
|
||||
return "stdin or stdout is not a terminal"
|
||||
trust(checkouts())
|
||||
before = human_turns(entries(path))
|
||||
subprocess.run(["claude", "--permission-mode", "bypassPermissions", "--resume", str(session_id)])
|
||||
|
||||
Reference in New Issue
Block a user