fix: fix: agent_run swallows all Claude failures silently via || true (#277) #286
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#286
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-277"
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?
Fixes #277
Changes
AI Review — Error\n\nReview failed.\n---\n
26fa11eAI Review
Summary
The PR fixes issue #277 where
agent_runsilently swallowed all non-zero exit codes fromclaudevia|| true. The fix is minimal, correct, and follows existing conventions.Review
What changed
|| truereplaced with&& rc=0 || rc=0to capture the exit code without triggeringset -e[ -n "$output" ]to prevent spurious nudges when Claude crashed or timed outnudge_rcwith identical logging patternFindings
None. The implementation is sound:
&& rc=0 || rc=0pattern is the correct ShellCheck-clean idiom for capturing exit codes underset -e; using a bare|| truewould swallow the code, a bare test would abort on non-zero[ -n "$output" ]correctly prevents resuming a dead session when the initial run produced no output — the previous code would have nudged even after a crash since_AGENT_SESSION_IDpersists across callsagent_runlogs failures but still returns 0; this is intentional (the callers are agent loops that should continue and let the empty-output state be handled upstream), and matches the scope of issue #277 which asked only for logging, not for abortingVerdict
APPROVE — Correctly captures and logs Claude exit codes; guards nudge against empty output; ShellCheck clean
Reviewed at
26fa11e| AGENTS.mdAI Review: APPROVE — Correctly captures and logs Claude exit codes; guards nudge against empty output; ShellCheck clean