Exit when loop-claude is started outside a checkout

This commit is contained in:
2026-09-25 08:44:48 +02:00
parent 76d1b218bf
commit 4d46d369d3
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -10,7 +10,7 @@ interrupt: `claude --resume` on the terminal. An unfinished chunk resumes the sa
cycle; a finished one starts a fresh session. Cycles continue until that interrupt or Ctrl-C. Words:
~/.claude/CLAUDE.md → "Vocabulary".
Exit 1: no task, no premises, claude leaves no transcript, or the worker or the judge fails three
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 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 exit. Before an interrupt every
@@ -115,7 +115,9 @@ def read_premises():
def checkout_root():
found = subprocess.run(["git", "rev-parse", "--show-toplevel"], capture_output=True, text=True)
return found.stdout.strip() if found.returncode == 0 else os.getcwd()
if found.returncode != 0:
sys.exit(found.stderr.strip())
return found.stdout.strip()
def project():