Skip to content

fix(framework): fail the turn on a non-zero claude-code exit#235

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/fix/claude-code-nonzero-exit
Jul 4, 2026
Merged

fix(framework): fail the turn on a non-zero claude-code exit#235
suleimansh merged 1 commit into
mainfrom
suleimansh/fix/claude-code-nonzero-exit

Conversation

@suleimansh

Copy link
Copy Markdown
Member

The Claude Code driver only failed a turn on a non-zero exit when the agent produced no text. If it streamed some text and then crashed (exit != 0, or SIGKILL with code null), the driver resolved a result turn and the loop could score the crash as production-grade and stop.

Now any non-zero exit fails the turn, surfacing stderr (else the partial text) as context. Added a regression test.

Closes #231

A non-zero exit was only treated as a failure when the agent produced no
text. If it streamed some text and then crashed, the driver resolved a
result turn and the loop could score the crash as production-grade. Fail
on any non-zero exit, surfacing stderr or the partial text as context.

Closes #231
@suleimansh suleimansh added bug Something isn't working priority: medium Worth doing, not urgent labels Jul 4, 2026
@suleimansh suleimansh self-assigned this Jul 4, 2026
@suleimansh suleimansh merged commit 1d3ce64 into main Jul 4, 2026
2 checks passed
@suleimansh suleimansh deleted the suleimansh/fix/claude-code-nonzero-exit branch July 4, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(framework): non-zero claude-code exit with partial output is treated as success

1 participant