{"version":"2.1.318","anchor":"ccr-upload-whole-file-withholding-and-stream-flush-timing-o","canonical_anchor":"ccr-upload-whole-file-withholding-and-stream-flush-timing-o","heading":"Remote sessions can send keep-alives on their own when event uploads fail","tier":"internal","area":"Remote Control","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/ccr-upload-whole-file-withholding-and-stream-flush-timing-o","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Remote sessions can send keep-alives on their own when event uploads fail\n\nRemote (CCR) sessions can post a lone keep-alive while event uploads fail, with new heartbeat, goodbye, flush-timing and withholding behaviour\n\n**Unclear.** When whole files are held back from remote viewers is not stated.\n\n**What**\n\nIn remote (CCR) sessions, Claude Code runs as a worker that sends its events to a remote service. A keep-alive is a small message that keeps the connection open. Keep-alives already required the `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES` environment variable and a remote flag. What is new:\n\n- Keep-alive on its own: through `noteEventsPostFailed`, `keepAlivesGoAlone` and `sendKeepAliveAlone`, the worker now sends a keep_alive by itself to \/worker\/events when uploads have been failing recently. This only happens when the failures were not rate limiting (code 429) and nothing is being withheld. The first failure only triggers this when `CLAUDE_CODE_REMOTE_SEND_KEEPALIVES` is set. Keep_alive rows from the normal write path also go this way. The failure state resets after an upload succeeds. Before, a keep-alive was only sent while a whole turn was held across model calls.\n\n- Heartbeat: the random variation in the heartbeat timing now has a minimum, and the timer has a maximum.\n\n- Goodbye: the goodbye message is now skipped while a session is being resumed (resume_load). Before, it was only skipped in the middle of a turn.\n\n- Flush timing: new uploader settings `streamEventWindowRunsFromLastFlush` and `heldBunchFlushMs`, set through `setStreamEventWindowRunsFromLastFlush` and `setHeldBunchFlushMs`, control how quickly streamed output is sent.\n\n- Withholding: a new `withholdsWholeFiles` path can withhold whole files. Tool results for virtual user rows are no longer trimmed. The first row that makes a request is marked ephemeral, meaning temporary. Before, the only trimming was blanking tool results and MCP images.\n\n- New records: new events are recorded for headless sessions holding a message during an interrupt, for a follow-up message ending that hold, for the lone keep-alive, and for subagent progress summaries being off.\n\n**Why**\n\nA remote session can now stay connected while the events service is failing, instead of dropping. Remote viewers may also see changes in how quickly output arrives and in what is withheld from them.\n\n- Area: Remote Control\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}