{"version":"2.1.271","anchor":"new-turn-handoff-mechanism-for-managed-cloud-worker-sessio","canonical_anchor":"turn-handoff-protocol-tool-call-handoff-to-a-managed-cloud","heading":"New turn_handoff protocol for handing off in-progress turns to cloud workers","tier":"soon","area":"Turn Handoff","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/new-turn-handoff-mechanism-for-managed-cloud-worker-sessio","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### New turn_handoff protocol for handing off in-progress turns to cloud workers\n\nA new turn_handoff protocol lets a session hand an in-progress turn with unrun tool calls off to a managed cloud worker\n\n**What**\n\n- New `turn_handoff` request 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.\n\n- The worker replies as accepted or duplicate, or with typed errors such as `turn_handoff_disabled`, `invalid_handoff`, `unsupported_tool`, or `recovered_by_restart`.\n\n- A new `turn_handoff_available` system event is emitted once a worker can accept a handoff, carrying the tools it will accept, a `worker_epoch`, and an optional `relay_marker` flag, so a client learns the capability from the event stream instead of probing the worker.\n\n- This applies to managed cloud worker sessions: admission is computed from `sdkUrl` and `CLAUDE_CODE_REMOTE_SESSION_ID` being set and `CLAUDE_CODE_ENVIRONMENT_KIND` being unset.\n\n- A `tengu_turn_handoff_run` telemetry event was added to track handoff usage.\n\n**Why**\n\nThis lets a turn keep going across a worker restart or handoff in managed cloud sessions, rather than losing an in-progress tool call.\n\n- Area: Turn Handoff\n- Names: `CLAUDE_CODE_REMOTE_SESSION_ID`, `CLAUDE_CODE_ENVIRONMENT_KIND`\n- Tier: Nothing to try yet\n- Useful: 5\/5\n- Signal: 5\/5\n- Present in the build but not switched on"}