{"version":"2.1.236","anchor":"gzipped-api-request-bodies-gated-off-with-a-retry-and-latch-","canonical_anchor":"gzipped-api-request-bodies-gated-off-with-a-retry-and-latch-","heading":"Gzipped API request bodies, gated off, with a retry-and-latch kill switch","tier":"soon","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.236\/e\/gzipped-api-request-bodies-gated-off-with-a-retry-and-latch-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.236","markdown":"### Gzipped API request bodies, gated off, with a retry-and-latch kill switch\n\nRequests to the API can be gzip compressed, but both switches default off so nothing compresses.\n\n**What**\n\nClaude Code can now compress outgoing API request bodies with gzip, decided per request by a helper that records exactly why it declined. It only applies on the Bun runtime, only to string bodies of at least 4096 characters, and never over unix sockets, proxies, mTLS or custom CA setups. Both remote gates default to off, so nothing is compressed in this build without a server-side value, and a rejected compressed request falls back to sending uncompressed and stops compressing afterwards.\n\n**Details**\n\n- Enabled by either of two remote flags, `tengu_atomic_ocean` or `tengu_gzip_request_bodies`, both falling back to false.\n- `CLAUDE_CODE_GZIP_REQUEST_BODIES` overrides the flags: set true it forces compression on unless the kill switch has already tripped, set false it forces it off.\n- Skip reasons recorded per request are `env_off`, `not_bun_runtime`, `non_string_body`, `below_min_size`, `latched_off`, `flag_off`, and the transport reasons `unix_socket`, `proxy`, `mtls` and `custom_ca`.\n- A compressed request answered with 400, 403 or 415 from what looks like an Anthropic or Cloudflare hop is resent uncompressed, and compression is switched off for the rest of the process.\n- When the rejection looks like it came from a non-Anthropic intermediary and the uncompressed retry succeeded, the off state is written to settings as `gzipRequestBodiesLatchedOff` so later sessions skip compression too.\n- The saved off state is honoured for about 7 days and then cleared, and per-session state tracks whether it is currently in effect.\n- Telemetry events are `tengu_gzip_request_body_fallback` for a rejected compressed request and `tengu_gzip_request_body_latch_cleared` when the saved switch expires, alongside per-request outcome reporting.\n\n**Evidence**\n\n`tengu_atomic_ocean`, `return ((e.latchedOff = !0), (e.persistedLatchInEffect = !0), !0);`\n\n- Flag `tengu_gzip_request_bodies`: Not enough to say (read for one account on one subscription tier against v2.1.236; this account: no value returned, anonymous baseline: no value returned, compiled default: not a boolean we can read)\n- Area: Internals\n- Tier: Nothing to try yet\n- Useful: 2\/5\n- Signal: 4\/5\n- Present in the build but not switched on"}