{"version":"2.1.247","anchor":"durable-event-uploads-are-tracked-per-batch-on-self-hosted-r","canonical_anchor":"durable-event-uploads-are-tracked-per-batch-on-self-hosted-r","heading":"Durable event uploads are tracked per batch on self-hosted runners","tier":"internal","area":"Cloud Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.247\/e\/durable-event-uploads-are-tracked-per-batch-on-self-hosted-r","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.247","markdown":"### Durable event uploads are tracked per batch on self-hosted runners\n\nOn your own compute, event batches are tracked so dropped ones fail fast instead of hanging.\n\n**What**\n\nThe cloud worker client now reports every batch of durable session events as it moves through sending, accepted or failed, and maps the requests carried in a batch back to their callers so a request in a dropped batch is rejected with a delivery-specific error instead of staying pending forever. The reporting and drop handlers are optional arguments, and the only caller that supplies them gates them to sessions on your own compute, so an ordinary local or cloud session behaves exactly as before.\n\n**Details**\n\n- Both handlers are installed only when the `CLAUDE_CODE_REMOTE` environment variable is set and `CLAUDE_CODE_ENVIRONMENT_KIND` is `byoc`, the setting for bring-your-own-compute runners; local CLI, ordinary cloud and Remote Control sessions keep the previous behaviour and the upload reporter returns immediately, leaving the bookkeeping invisible.\n- The drop handler fires when a batch is discarded on a 4xx response from the server, and the rejection error class reflects how far delivery got.\n- Ephemeral batches are not reported, only durable ones.\n- A handler that throws is caught and logged as a warning reading `CCRClient: onDurableEventsDropped threw; batch still dropped: `, and the batch's fate is unchanged.\n- The gate as compiled is a zero-argument helper call that could in principle be a differently named check, but no competing definition appears in the file.\n\n**Evidence**\n\n`onDurableEventsDropped`, `CCRClient: onDurableEventsDropped threw; batch still dropped: `, `onDurableEventsUpload`\n\n- Area: Cloud Sessions\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 4\/5"}