{"version":"2.1.296","anchor":"api-client-adds-per-request-extra-headers-and-awaits-a-heade","canonical_anchor":"api-client-adds-per-request-extra-headers-and-awaits-a-heade","heading":"Claude Code now gathers extra request headers when it sets up its API connection","tier":"internal","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296\/e\/api-client-adds-per-request-extra-headers-and-awaits-a-heade","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296","markdown":"### Claude Code now gathers extra request headers when it sets up its API connection\n\nWhen Claude Code sets up its connection to the API, it now fetches extra headers and adds them to every kind of connection it makes\n\n**Unclear.** Which headers the new source actually adds is not stated.\n\n**What**\n\nWhen Claude Code sets up the connection it uses to talk to the API, it now waits for a separate source to supply extra headers before finishing. Headers are small labelled pieces of information sent along with each request. Before, all headers were put together at once, without waiting on anything.\n\nThe extra headers depend on which part of Claude Code is sending the request and on the current permission settings, meaning the rules about what Claude is allowed to do. They are merged into the headers for every kind of connection Claude Code makes:\n\n- a connection through a gateway (a server that sits between Claude Code and the API)\n\n- a connection that does not sign in with OAuth (the browser-based login)\n\n- the default connection\n\nThe base set of headers that goes with every request is now also set explicitly.\n\n**Why**\n\nThis can change which headers your requests carry. That matters if you add your own headers with `ANTHROPIC_CUSTOM_HEADERS`, or if a proxy or gateway in your setup inspects incoming headers.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}