{"version":"2.1.307","anchor":"remote-session-client-keep-alive-events-and-heartbeat-skip","canonical_anchor":"remote-session-client-keep-alive-events-and-heartbeat-skip","heading":"Remote sessions can send keep-alive signals while a turn is waiting on the model","tier":"use","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307\/e\/remote-session-client-keep-alive-events-and-heartbeat-skip","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307","markdown":"### Remote sessions can send keep-alive signals while a turn is waiting on the model\n\nWith `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES` set, remote sessions send a keep-alive signal during long turns, and the WebSocket link now skips heartbeats too\n\n**Unclear.** A second condition besides the environment variable is also required, and what it checks is not known.\n\n**What**\n\nWith the `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES` environment variable set, keep-alive signals now also cover turns that are held open across several calls to the model. During such a turn, if no reply has come back from the server recently, Claude Code sends a keep-alive signal, a small message that says the session is still alive, on its regular heartbeat schedule.\n\nThe rule for skipping a regular heartbeat also changed. It used to never apply when the session was connected over a WebSocket, a connection that stays open in both directions. It now applies to WebSocket connections as well.\n\n**Why**\n\nThis helps remote sessions, ones run on a cloud machine, stay connected during long turns instead of being treated as gone.\n\n- Area: Sessions\n- Names: `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}