Repository navigation
Document delivery exit codes and status semantics - #1572
Conversation
Architecture-Review: unchanged; the documented behavior matches the current CLI without changing the delivery interface. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 6478724acb0dc09bbf72820e2ca80c8ee2c42dbe, 30.8s: approve (0 critical, 0 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| operator-facing code wraps an error. Stop on terminal failures or quota errors. | ||
| Exit 3 means waiting: rerun the bounded waiter. Exit 5 means changes requested, | ||
| not a crash. | ||
| Exit 3 means waiting or timeout. Review exits 4 when independent review is |
There was a problem hiding this comment.
suggestion: Exit 3 line no longer tells the agent what to do next
I checked the new exit-code text against src/loopzero/cli.py and it is accurate. Exit 3 is used for ready/merge waits and timeouts (lines 1192–1210 and 1601–1631). Exit 4 comes from IndependentReviewerUnavailable (line 1837). Exit 5 means request_changes (line 884). Exit 130 is returned on KeyboardInterrupt (line 1847).
The problem is the wording that was dropped. The old text said "Exit 3 means waiting: rerun the bounded waiter" and "Exit 5 means changes requested, not a crash." The new text only says what each code means, not what to do. This paragraph is the agents' failure-handling guidance, so an agent that gets exit 3 or 5 no longer has a next step here. Line 46 does say to rerun the last --wait on resume, but only in the start/resume context. Exit 4 also gets no next step.
Smallest fix: put the actions back without losing the new facts, e.g. "Exit 3 means waiting or timeout: rerun the bounded waiter. Review exits 4 when independent review is unavailable and 5 when changes are requested (a verdict, not a crash). Interruption exits 130."
| `loopzero status` prints where the current branch is in that sequence. It | ||
| requires authenticated access to the configured GitHub repository even before | ||
| a PR exists. | ||
| `loopzero status` reports the branch stage and can exit 0 with `ready: no`. |
There was a problem hiding this comment.
suggestion: Status line drops 'configured repository' and doesn't mention the no-PR case
The new README wording is accurate: cmd_status always returns 0 after printing ready: yes/no (cli.py:1720–1725). It also returns 0 when the branch has no PR yet (line 1710), which the new sentence doesn't mention.
The rewrite also changed "authenticated access to the configured GitHub repository" to "authenticated GitHub access". The old wording was more precise: the account needs access to config.repo, not just any GitHub login.
Optional fix: keep "to the configured repository", and if you want, add "status exits 0 unless it errors; only ready and merge gate on readiness" to make the difference between status and readiness explicit.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Document delivery exit codes and status semantics
Context and goal
Closes #1552
Acceptance
Validation
Recorded for
6478724acb0duv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review