{"version":"2.1.281","anchor":"early-remote-connect-for-resumed-sdkccr-sessions-behind-a","canonical_anchor":"early-remote-connect-for-resumed-sdkccr-sessions-behind-a","heading":"Resumed cloud sessions can connect early, with held event delivery","tier":"use","area":"SDK","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/early-remote-connect-for-resumed-sdkccr-sessions-behind-a","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Resumed cloud sessions can connect early, with held event delivery\n\nWith CLAUDE_CODE_CCR_EARLY_REMOTE_CONNECT set, resumed SDK\/cloud sessions open their remote link early and hold incoming events until startup finishes\n\n**Unclear.** The finding calls `CLAUDE_CODE_CCR_EARLY_HYDRATE_PREFETCH` both existing and new, so whether it first appears in this build is unclear.\n\n**What**\n\nWhen Claude Code resumes a session running in the cloud (a CCR session, started with `--sdk-url`), it can now open its remote connection while the rest of startup is still running.\n\n- A new environment variable, `CLAUDE_CODE_CCR_EARLY_REMOTE_CONNECT`, turns this on. `CLAUDE_CODE_CCR_EARLY_HYDRATE_PREFETCH` still triggers early loading of session data. Either one, plus `--sdk-url` and a resume, starts `startEarlyRemoteWork`, which replaces `startEarlyHydrateReads` and returns both the data reads and a remote link. Nothing starts early when no auth headers are present.\n\n- Both variables were added to the lists of environment variables that are passed through to child processes.\n\n- The SSE transport (the streaming connection that carries events) has a new `deferDelivery` option. When set, incoming frames and close events are held and then replayed by `startDelivery()`, passing each held frame's worker attestation policy reading along in order. The early path uses `deferDelivery: !0`; the main path uses `deferDelivery: !1`.\n\n- The remote IO layer accepts an `earlyRemoteLink` and reuses the already-connected transport and client instead of building its own, calling `startDelivery()` rather than `connect()`. This is valid only for a process that owns its remote IO.\n\n- A new `takeWorkerAttestationPolicy` records the attestation policy and reports any fault, and the idle tracker is no longer set up at declaration.\n\n**Why**\n\nA resumed cloud worker can register and open its stream sooner, which should shorten a cold resume, and holding events means an early request is not lost before the session is ready. Nothing changes unless the host sets one of the environment variables.\n\n- Area: SDK\n- Names: `CLAUDE_CODE_CCR_EARLY_REMOTE_CONNECT`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}