What
When Claude Code runs as a remote session (labelled CCR), it uploads a stream of events, such as messages and acknowledgements, to a server. A flush policy sent by the server decides when those events are held back and when they are sent. Before, the policy only read max_events, max_age_ms, max_bytes, the flush_on_* settings, hold_across_model_calls, flush_before_tools_wait_ms, flush_after_tools, must_flush_types, live_twin_types, merge_worker_reports and policy_version. It now also reads:
joint_upload(jointUpload): a newofferToEventsPoststep lets held rows travel along with the events POST, the upload request for events, whenjointUploadis true and the rule isserved_policy.hold_again(holdAgain):endWholeTurnHoldnow takes the call that ended a whole-turn hold, and the hold is re-armed only ifholdAgainincludes that call; otherwiseholdsNoMoreThisTurnis set. A newopenTurnresets the hold state at the start of each turn. Before, a whole-turn hold simply became a hold for each call.flush_after_tool_names(flushAfterToolNames); cleared tool-call tracking is reset whenflushAfterToolschanges.may_wait_types(mayWaitTypes),transcript_max_age_ms(transcriptMaxAgeMs),control_traffic_keeps_hold(controlTrafficKeepsHold),empty_checkpoint_keeps_hold, themetadata_*settings such asmetadata_max_wait_ms, andcost_report_max_wait_ms.settings_receipts_max_wait_ms(settingsReceiptsMaxWaitMs) andmessages_received_waits(messagesReceivedWaits).
Each setting is read from the policy and must be exactly true or a list. Nothing in the code gives a default that turns any of them on.
Receipts and answers can now be held too:
- 'received' delivery receipts, which tell the server an event arrived, used to be sent straight away. They are now kept waiting for up to
settingsReceiptsMaxWaitMswhen the event is a settings request, or whenmessagesReceivedWaitsis set and a hold is on, and are then sent together with 'processing' acknowledgements. - Answers to settings requests, which
writeEventsused to send immediately, are held for up tosettingsAnswersMaxWaitMsand sent together. A newsendWaitingAnswersstep runs before a pickup acknowledgement. - Control-traffic events can leave a hold in place when
controlTrafficKeepsHoldis set, and incoming events now carrycontrolTrafficandsettingsRequestflags. - On shutdown,
beginShutdown()now callssendWaitingReceipts()first. - Live-twin handling now also covers
tool_progressheartbeats, the regular progress signals from running tools.
Why
How remote session events are batched and in what order acknowledgements go out can now be tuned from the server, but only for sessions whose server policy sets these values. Receipts that are still waiting when a session closes are now sent before shutdown instead of being left behind.