What
- Streaming partial-message frames can now carry a
resume_reasonfield explaining why the current turn is an automatic re-run of one interrupted by a worker restart:host_draining,checkpoint_restore,container_recreated, or a fallbackinterrupted_turn. This ties to theCLAUDE_CODE_RESUME_INTERRUPTED_TURN/CLAUDE_CODE_RESUME_REASONmechanism. - The SDK/headless turn-result schema gains the same optional
resume_reasonstring, plus an optionalresult_indexinteger, in both the streamed and final result message shapes. - When Claude Code auto-resumes an interrupted turn at session restart, the reconstructed prompt now includes a
resumeReasonand, when available, aresumedTurnUserMessageUuidpointing back to the original interrupted turn's user message.
Why This makes it clear, both in the UI/streaming output and in SDK results, why a turn was automatically re-run after an interruption (such as the worker host draining or a container being recreated), and links the resumed turn back to the original one it replaced.
Documented inclaude-code/agent-sdk/typescript
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on Agent SDK reference - TypeScript touched a line naming resume_reason after this was published.
* `resume_reason`: why Claude Code re-ran this turn after a restart interrupted it. Present on both arms. See [`resume_reason`](#resume_reason).agent-sdk/typescript see the edit
Confirmed since
Anthropic's documentation has since written up resume_reason, on Agent SDK reference - TypeScript.
resume_reason?: string;agent-sdk/typescript see the edit
Added since
A small documentation edit on Manage sessions touched a line naming CLAUDE_CODE_RESUME_INTERRUPTED_TURN after this was published.
* Conversation history: the full history, including tool calls and results. A tool that was still running when the previous process ended, for example in a crash, doesn't finish or run again when you resume. Claude sees the call marked as …sessions see the edit
Confirmed since
Anthropic's documentation has since written up CLAUDE_CODE_RESUME_INTERRUPTED_TURN, on Claude Code changelog.
* Fixed `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` re-running a turn that had failed with an API error over 6 hours earlier, or longer ago than `CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS` when setchangelog see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up CLAUDE_CODE_RESUME_INTERRUPTED_TURN, on Claude Code changelog.
The name it cites is new in this build
New in this build: CLAUDE_CODE_RESUME_REASON