claude-code
claude-code copied to clipboard
[BUG] `stop_reason` is always `None`
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: <!-- output of
claude --version-->1.0.10 (Claude Code) - Operating System: N/A
- Terminal: N/A
Steps to Reproduce
- update to v1.0.10
- run
claude -p "run ls" --output-format stream-json --verbose - look at the ouput
Expected Behavior
tool_use/end_turn/etc values for stop_reason
Hey! This is a recent change, and was intentional, due to an implementation detail in the way streaming works. What were you relying on the stop_reason for, out of curiosity?
@bcherny I created an app to notify on my macbook whenever stop_reason is end_turn. Can we have this back instead of null or None?
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.