{"version":"2.1.236","anchor":"the-compression-decision-is-rebuilt-from-a-one-liner-into-a-","canonical_anchor":"the-compression-decision-is-rebuilt-from-a-one-liner-into-a-","heading":"The compression decision is rebuilt from a one-liner into a full decision path","tier":"soon","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.236\/e\/the-compression-decision-is-rebuilt-from-a-one-liner-into-a-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.236","markdown":"### The compression decision is rebuilt from a one-liner into a full decision path\n\nThe gzip decision now records exactly why it skipped, though compression stays off without a server value.\n\n**What**\n\nIn 2.1.235 this was a single expression checking one environment variable and one flag. It is now a function that returns a reason for every skip: `not_bun_runtime`, `below_min_size` for bodies under 4096 characters, `non_string_body`, and the transport reasons `unix_socket`, `proxy`, `mtls`, `custom_ca`. Both gates default to off, so absent a server value nothing is compressed.\n\n**Details**\n\n- `tengu_atomic_ocean` and `tengu_gzip_request_bodies` are OR'd; `CLAUDE_CODE_GZIP_REQUEST_BODIES` overrides either way, and forcing it on still respects the in-process kill switch.\n- New this release: a 400, 403 or 415 rejection of a compressed body from an Anthropic response causes an uncompressed resend and turns compression off, optionally saved to the global config key `gzipRequestBodiesLatchedOff` with a timestamp and status, honoured for 7 days and then cleared with `tengu_gzip_request_body_latch_cleared`.\n- Request telemetry now carries `requestBodyEncoding`, `gzipSkipReason` and `gzipFallbackStatus`.\n\n**Evidence**\n\n`not_bun_runtime`\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: 1\/5\n- Signal: 2\/5\n- Present in the build but not switched on"}