New turn_handoff protocol for handing off in-progress turns to cloud workers#
A new turn_handoff protocol lets a session hand an in-progress turn with unrun tool calls off to a managed cloud worker
Unclear It is unclear what a tengu_turn_handoff_run reading would mean for this feature's availability, since nothing has been read about that gate yet.
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.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.275
Turn handoff can now carry a memory_context line
Both mention turn handoff
-
v2.1.222
Subagent models outside the allowlist step down within their family
Both mention available
-
v2.1.267
Bug fix: availableModels validator was reading from the wrong variables
Both mention available