agent.service exits 1 at security-review Skill, abandoning PR-review rework mid-tick #279
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: 1 minute 28 seconds
Due date
igor
1 minute 28 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#279
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
Twice in this hour the PR-review rework tick for
joshtronic/porksicle.com#91died abruptly withstatus=1/FAILUREat the moment claude invoked the security-review[tool: Skill]step. In both cases there is no[agent] claude exited ...line and no harness-commit — the tick just dies, discarding the completed rework (the 22:17 tick had already redone the 6-level reconciliation; the 22:49 tick had finished the R-key restart fix + Playwright verification). Compare the healthy ticks (22:11, 22:42) where the same security review runs to completion and logs[agent] claude exited 0 after ...sbefore committing.The crash is non-deterministic (the 22:33 tick passed through the same Skill cleanly) but recurred twice in one hour. Net effect: PR #91 is burning full claude invocations (500s+ each) that get thrown away, forcing the harness to re-review from scratch each tick.
Evidence
The recent commit
fix(claude): bookkeeping can't crash the tick on a mid-stream claude exittargets an adjacent crash, but the failure recurs twice in this window, so that guard does not cover the security-review/Skill exit path.Fixed looks like
Invoking the security-review Skill can no longer take the tick down with exit 1: claude either completes the review and the harness commits/re-requests review, or any mid-stream sub-process exit is caught and logged (
[agent] claude exited N) and the tick exits 0 without abandoning the worktree.service: agent.service
severity: medium
window: 2026-06-27 22:00-23:00 (filed by the hourly logwatch pass)
Investigated but deliberately NOT patched with a guess — observability added in #280 instead. Key finding: the post-pipe bookkeeping in
claude_run_with_costis provably abort-proof (cost/health are guarded;classifyandrecord_failureboth return 0), so the death is in the claude / security-review-Skill PROCESS, not the harness. That means the actual cause is in claude’s stderr, which the harness currently throws away on a crash. #280 preserves the raw claude stream to~/.local/state/agent/crash-logs/whenever a tick dies mid-call, so the next occurrence will show the real cause. Leaving this open until that lands a diagnosis.Once-over -- closing. The crash last fired Jun 27 (3x that night, all on the porksicle#91 rework hitting the security-review Skill); zero recurrences since (Jun 28-29 clean), and the triggering rework has resolved. Root stays undiagnosed, but it is a claude / security-review-Skill PROCESS death, not the harness bookkeeping (which I verified is abort-proof -- cost/health are guarded, classify and record_failure return 0). #280 is now live and preserves the claude stream to ~/.local/state/agent/crash-logs/ on the next mid-call death, so if this returns we will have the actual cause and logwatch will re-file. No actionable work is pending, so closing as not-currently-reproducing with the observability as the safety net.