fix(agent-claude-code): handle missing result line gracefully #576

Merged
xiaonuo merged 1 commits from fix/574-silent-fail-handling into main 2026-05-30 05:52:55 +00:00

1 Commits

Author SHA1 Message Date
xiaoju 53fa4d8972 fix(agent-claude-code): handle missing result line gracefully
CI / check (pull_request) Successful in 1m44s
Handle the case where Claude Code exits without producing a result line
(timeout, OOM, signal kill). Previously returned null and threw an error;
now returns incomplete result with best-effort output extraction.

Changes:
- Add "incomplete" as new ClaudeCodeResultSubtype value
- Extract output from last assistant turn when no result line exists
- Enhanced error messages distinguish incomplete vs unparseable output
- Store incomplete results in CAS with appropriate metadata
- Add 10 comprehensive test cases for incomplete result handling

Fixes #574

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 05:37:09 +00:00