What
- New
turn_handoffrequest and response let a session client transfer an in-progress turn (one whose last assistant message has tool calls that haven't run yet) to a worker process, which validates and runs the calls and continues the turn. - The worker replies as accepted or duplicate, or with typed errors such as
turn_handoff_disabled,invalid_handoff,unsupported_tool, orrecovered_by_restart. - A new
turn_handoff_availablesystem event is emitted once a worker can accept a handoff, carrying the tools it will accept, aworker_epoch, and an optionalrelay_markerflag, so a client learns the capability from the event stream instead of probing the worker. - This applies to managed cloud worker sessions: admission is computed from
sdkUrlandCLAUDE_CODE_REMOTE_SESSION_IDbeing set andCLAUDE_CODE_ENVIRONMENT_KINDbeing unset. - A
tengu_turn_handoff_runtelemetry event was added to track handoff usage.
Why
This lets a turn keep going across a worker restart or handoff in managed cloud sessions, rather than losing an in-progress tool call.
Names in the bundleCLAUDE_CODE_REMOTE_SESSION_IDCLAUDE_CODE_ENVIRONMENT_KIND
Documented inclaude-code/cloud-environments
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.
Confirmed since
Anthropic's documentation has since written up CLAUDE_CODE_REMOTE_SESSION_ID, on Customize sessions in self-hosted environments.
| `CLAUDE_CODE_REMOTE_SESSION_ID` | Session ID in the tagged `cse_...` form. This is the same session the [lifecycle hooks](#lifecycle-hooks) see as `CLAUDE_RUNNER_SESSION_ID` in `session_...` form; the UUID variables match across both, an…self-hosted-environments-configuration see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up CLAUDE_CODE_REMOTE_SESSION_ID, on Customize sessions in self-hosted environments.