Answer: If a stream is cut off mid-message, you still receive that message's `message_stop` before the turn ends; treat a tool call's input as incomplete if `message_stop` arrives while its block is still open, and don't wait for a `message_delta` on a cut message. If a reply stays shown as in progress after the turn ends, update the SDK. Status: Confirmed Entry: tool/claude-code/troubleshooting/handle-cut-off-stream Revision: 2 Digest: sha256:6718e2edc761424f (changes whenever the content changes) Timeline: Created: 2026-11-13T03:03:00Z Last changed: 2026-11-18T12:13:08Z (message_delta guidance: — → don't wait for one on a cut message) Last verified: 2026-11-20T12:17:22Z Next check: 2026-11-21T12:17:22Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of message_stop behavior | you still receive that message's `message_stop` before the turn ends | [1] | 2026-11-20 content_block_stop guidance | treat that call's input as incomplete | [1] | 2026-11-20 message_delta guidance | don't wait for one on a cut message | [1] | 2026-11-20 TypeScript SDK version | v0.3.290 | [1] | 2026-11-20 Python SDK version | v0.2.164 | [1] | 2026-11-20 Claude Code version | v2.1.290 | [1] | 2026-11-20 Sources: [1] Anthropic. "Stream responses in real-time". https://code.claude.com/docs/en/agent-sdk/streaming-output.md Role: primary. Accessed: 2026-11-20T12:17:22Z Quote: "you still receive that message's `message_stop` before the turn ends" (Supports: message_stop behavior) Quote: "If `message_stop` arrives while a tool call's block is still open, treat that call's input as incomplete." (Supports: content_block_stop guidance) Quote: "so don't wait for one on a cut message" (Supports: message_delta guidance) Quote: "The TypeScript Agent SDK bundles Claude Code v2.1.290 or later from v0.3.290" (Supports: TypeScript SDK version) Quote: "and the Python Agent SDK from v0.2.164" (Supports: Python SDK version) Quote: "Before Claude Code v2.1.290, a cut stream could end the turn without `message_stop`" (Supports: Claude Code version) Published: 2026-11-20T02:53:05Z Snapshot SHA-256: 355c4b90fa6b286dd1ed7f94e08cfbcfc750e8616a7615d0e119a63e10a66309 (captured 2026-11-17T12:21:32Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:21:34Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:17:22Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:22Z Last attempt: 2026-11-20T12:17:22Z Notes and limitations: Extracted automatically from a single official source (section "Handle a stream that's cut off"). Related: https://latestn.com/tool/claude-code/troubleshooting/hook-not-firing How do I fix a hook that is not firing in Claude Code? https://latestn.com/tool/claude-code/troubleshooting/hook-skipped-mod-unloaded Why is a Claude Code hook skipped or a mod unloaded? https://latestn.com/tool/claude-code/troubleshooting/hooks-module-not-loaded What does the Claude Code refusal message "hooks module not loaded" mean when running claude -p? https://latestn.com/tool/claude-code/troubleshooting/ghes-limitations What are the limitations of using Claude Code with GitHub Enterprise Server? https://latestn.com/tool/claude-code/troubleshooting/github-actions-cloud-provider-troubleshooting What should I check if Claude Code GitHub Actions fails to authenticate with my cloud provider? https://latestn.com/tool/claude-code/troubleshooting/gitlab-claude-not-responding How do I troubleshoot Claude Code not responding to @claude commands in GitLab? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:13:08Z | changed | message_delta guidance: — → don't wait for one on a cut message | [1] 2026-11-18T12:13:08Z | changed | content_block_stop guidance: — → treat that call's input as incomplete | [1] 2026-11-18T12:13:08Z | changed | message_stop behavior: — → you still receive that message's `message_stop` before the turn ends | [1] 2026-11-18T12:13:08Z | changed | message_delta handling: don't wait for one on a cut message → — | [1] 2026-11-18T12:13:08Z | changed | tool call handling: treat that call's input as incomplete → — | [1] 2026-11-18T12:13:08Z | changed | cut-off behavior: you still receive that message's `message_stop` before the turn ends → — | [1] 2026-11-13T03:03:00Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/troubleshooting/handle-cut-off-stream/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/troubleshooting/handle-cut-off-stream POST: https://latestn.com/dispute/tool/claude-code/troubleshooting/handle-cut-off-stream with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/troubleshooting/handle-cut-off-stream?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I handle a stream that gets cut off in the Claude Code Agent SDK? Revision 2, last verified 2026-11-20T12:17:22Z. https://latestn.com/tool/claude-code/troubleshooting/handle-cut-off-stream (accessed 2026-11-21T09:57:16Z). @misc{LatestN_tool_claude_code_troubleshooting_handle_cut_off_stream_r2, title = {How do I handle a stream that gets cut off in the Claude Code Agent SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/troubleshooting/handle-cut-off-stream}}, note = {Revision 2; digest sha256:6718e2edc761424f; last verified 2026-11-20T12:17:22Z; accessed 2026-11-21T09:57:16Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/troubleshooting/handle-cut-off-stream