Root-cause: claude exits 1 mid-run (non-catastrophic since #307) #306
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 3 minutes 2 seconds
Due date
igor
3 minutes 2 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#306
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Diagnosis
Two of three substantive claude runs this hour terminated nonzero (
exited 1) partway through their workflow -- well under the 30m timeout -- before writing the requiredPR_BODY.md, triggering the harness fallback:The run that exited 0 (#109) wrote its own PR body and needed no fallback. The exit-1 runs abort right after a tool result at a natural mid-task point (not a clean finish), which is the same root cause behind the #110 wrong-diff merge -- the process is dying before it completes cleanup, stash-restore, and its final artifacts. Even when the diff survives (#108), the PR body is degraded to a Haiku synthesis rather than claude's own.
What "fixed" looks like
claudeexits 1 mid-run (unexpected nonzero from a tool/cleanup step, sandbox denial, or resource limit) rather than only papering over the missing PR_BODY.md.service: agent.service
severity: medium
window: 2026-06-30 21:00-22:00 (filed by the hourly logwatch pass)
Partially resolved by #307 — re-scoping, keeping open.
Two of the three items here shipped:
${CLAUDE_EXIT:-1}gate.$AGENT_MODEL(Sonnet); only the log string said "Haiku" — which is exactly what tricked this logwatch pass into the "forcing Haiku fallback" framing. Log/comment strings corrected in #307.Remaining: the open-ended root-cause of why
claudeexits 1 mid-run (transient CLI/tool nonzero vs. a resource limit). #307 de-fanged it, so this drops from P0 to a low-priority investigation. Keeping it open as the tracker + the logwatch dedup anchor (so the now-benign "claude exited 1" smell doesn't get re-filed every hour). Retitled to match; unassigning from triage since the decision is made (backlog investigation, not an urgent human call).claude runs exit 1 mid-workflow before writing PR_BODY.md (2x this hour), forcing Haiku fallbackto Root-cause: claude exits 1 mid-run (non-catastrophic since #307)Closing. The actionable parts shipped in #307 (ship-safety gate + the Haiku red-herring); the remaining 'why does claude exit 1 mid-run' is now non-catastrophic. Per the operating rule — don't park tickets; let recurrence be the signal — if the exit-1 keeps happening the hourly logwatch pass will re-file it, and that recurrence is our cue to chase the root cause. No value in holding it open as a rotting anchor. (If logwatch starts re-filing the now-benign 'ship-safety: ... re-queuing' line as noise, that's a separate one-liner: teach it that pattern is expected.)