{"version":"2.1.311","anchor":"ccr-client-init-worker-state-read-can-be-abandoned-and-keep","canonical_anchor":"ccr-client-init-worker-state-read-can-be-abandoned-and-keep","heading":"Remote session keep-alive and event-hold handling reworked","tier":"internal","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/ccr-client-init-worker-state-read-can-be-abandoned-and-keep","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### Remote session keep-alive and event-hold handling reworked\n\nRemote sessions get new keep-alive rules, a fixed event-hold policy in place of a server switch, and can start without their stored worker state\n\n**What**\n\nA remote session is one where Claude Code runs on a cloud machine instead of your own computer. A keep-alive is a small signal that tells the server the session is still working. Several parts of how these sessions start, stay alive and send their events changed together.\n\n- **Startup without stored state:** when a worker registers and its read of stored worker state (`GET \/worker`) has not finished, that read can now be abandoned. Claude Code logs that it is continuing without the stored worker state.\n\n- **Keep-alive at work start:** a new `keepAliveAtWorkStart` option starts a keep-alive timer when work begins. It applies to sessions that own their process and depends on model calls, tool runs and hook runs.\n\n- **Work-only state:** the keep-alive timer is skipped, and an active one ends, when a helper reports that only work-only tasks remain.\n\n- **Classifier keep-alives:** these still need the `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES` environment variable. They used to also need the `tengu_ccr_classifier_keepalive_enabled` server flag, but now also run when a second check passes, even if that flag is false. What the second check tests was not resolved.\n\n- **New keep-alive gate:** a new helper turns keep-alives on only when `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES` is set, a check passes, `tengu_encapsulated_honey` evaluates to \"on\", and another check does not trip. Nothing has been read yet about this gate.\n\n- **Event hold:** the `eventHoldEnabled` option, which read the server flag `tengu_ccr_event_hold_enabled` with a fallback of true, is replaced by a fixed `followsServedPolicy: true`. The client's `mergesSameRun` and `waitsForStatus` now check `followsServedPolicy`.\n\n- **Headless session fields:** `pulseKeepAlive` is replaced by `sessionSignal` and `keepAlive`, and `hasLiveSessionWakeup` is added. This suggests a rework of idle and wake-up handling in sessions that run without a screen.\n\n**Why**\n\nRemote sessions can start sooner when the stored-state read is slow, and they keep alive or stop keeping alive under different rules. Event holding is now built in rather than controlled by a server switch, so it can no longer be turned off from the server for this build.\n\n- Area: Sessions\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}