Skip to content

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

Description

@suleimansh

The Claude Code driver's close handler only fails a turn when the exit is non-zero AND there was no text:

if (code !== 0 && !turn.text) { ...reject... }

parser.result() returns finalText || assistantText, so if claude -p streams some assistant text and then crashes (exit != 0, or SIGKILL with code null), the driver still emits a result turn and resolves as success. Downstream the checklist treats a missing verdict as empty-blockers, so a crashed build can be scored production-grade and stop the loop.

This undercuts the outcome-gating the bypassPermissions default (#226) was meant to enable.

Fix: fail the turn on a non-zero exit even when partial text is present, still surfacing that text (and stderr) as context. driver/claude-code.ts around line 190.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority: mediumWorth doing, not urgent

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions