[BUG] Sometimes missing result in --output-format stream-json
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using --output-format stream-json, the final message with subtype: success returns an empty result field instead of containing the actual response content/output.
What Should Happen?
Result shouldn't be empty.
Error Messages/Logs
Steps to Reproduce
Not sure, happens randomly with the following arguments:
-p
--verbose
--mcp-config [mcpFile]
--output-format stream-json
--max-turns 100
Claude Model
Sonnet (default)
Is this a regression?
I don't know. But maybe, because when I started with claude code like 1.0.20? It never happened, and it seems it's getting worse over time
Last Working Version
_No response_
Claude Code Version
1.0.123
Platform
Google Vertex AI
Operating System
Other Linux
Terminal/Shell
Non-interactive/CI environment
Additional Information
Also sometimes happens, that final result_sucesss message is missing.
In previous messages I can see "type: message" that contains response that I would expect
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗