The Claude Code Changelog
All Episodes
Claude Code 2.1.273: Gateway Hints for Smarter Routing

Claude Code 2.1.273: Gateway Hints for Smarter Routing

0:00|0:00

We break down Anthropic’s latest Claude Code update, including opt-in gateway hint headers that let proxies route traffic without inspecting private prompt bodies. Plus, we cover cleaner MCP reconnect notifications, remote session forking, and the return of local default classification for Bedrock and Vertex auto mode.


Chapter 1

Inspecting Claude Code Traffic with Gateway Hint Headers in 2 point 1 point 273

James Turner

Quick shoutout to our sponsor Jellypod AI before we dive in! So, if you are running an enterprise proxy like LiteLLM or Envoy in front of your developer tools, you know the absolute nightmare of inspecting traffic. Every single time a developer or a subagent hits `/v1/messages`, the gateway used to have to unpack the entire JSON body just to figure out what kind of request it even was.

Lachlan Reed

Oh mate, yeah. Digging through massive payload bodies on every single HTTP POST just to see if it is a quick interactive prompt or some heavy background task? It destroys latency. Your ingress routers get bogged down, token attribution gets super messy, and suddenly your primary dev sessions are getting rate limited because some background task is eating all the bandwidth.

James Turner

Exactly. But in the latest Claude Code release, version 2 point 1 point 273, Anthropic fixed this metadata blindspot entirely. They added a new feature where if you export `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1`, the client automatically passes five clear HTTP hint headers on every request.

Lachlan Reed

Five headers, right. What are we looking at?

James Turner

So you get `x claude code request class`, `x claude code agent type`, `x claude code prev tool durations`, `x claude code compaction`, and `x claude code context compacted`. That means your proxy can instantly read `x claude code agent type` set to subagent, or see a compaction request, without ever opening or reading private prompt text!

Lachlan Reed

That is huge for DevOps! Think about NGINX or Envoy routing rules now. You can take any request where `x claude code compaction` is set to 1 and send it off to a low priority background queue, or route background subagent traffic over to cheaper Bedrock or Vertex inference pools. Main terminal sessions stay lightning fast on high priority tier while long tasks run in the background.

James Turner

Right! Just remember it is totally opt in for now, so you need to set `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1` in your developer shell scripts or runner containers to turn those headers on.

Lachlan Reed

Easy enough. And look, there are a few other crackin quality of life updates in 2 point 1 point 273 as well, yeah?

James Turner

Oh yeah! First, if an MCP server drops connection mid session and auto reconnect gives up, Claude Code now pops a clean notification telling you to jump straight to `/mcp` to fix it. Second, if you launch a session with `claude --remote control`, you can now fork that session directly from the Claude app into a background task on your local machine.

Lachlan Reed

That forking trick is going to save me so much hassle. Plus, auto mode on Bedrock and Vertex switched back to using the local classifier by default, unless you set `CLAUDE_CODE_AUTO_MODE_SERVER=1` to force platform server side checking. Good little release all around!