Claude Code 2.1.276 fixes proxy 400 errors: recover custom gateways without hiding protocol drift
Quick answer
Anthropic released Claude Code 2.1.276 on September 18, 2026 to fix a 2.1.275 regression that made every request fail with a 400 containing Input tag 'advisor_20260301' when ANTHROPIC_BASE_URL pointed to a proxy or gateway. If that exact signature appeared immediately after moving to 2.1.275, pin 2.1.276 explicitly, keep the same gateway route, and rerun a small acceptance matrix before restoring traffic.
Do not classify every proxy-side 400 as this bug. A malformed request, rejected credential, unsupported endpoint, or gateway rewrite can produce the same HTTP status. The safe recovery proves the version, the effective route, and the request path separately.
Who this is for
This checklist is for teams that route Claude Code through an internal LLM gateway, observability proxy, regional endpoint, or policy layer by setting ANTHROPIC_BASE_URL. It is especially useful when background agents or CI jobs inherit configuration from a settings file rather than an interactive shell.
The objective is not merely to make one prompt succeed. It is to show that the corrected client can pass through the same production route without masking a protocol-compatibility problem.
What changed and why it matters
The official 2.1.276 release note is unusually narrow: it says the release fixes every request failing with the advisor_20260301 input-tag error for proxy or gateway users, and identifies 2.1.275 as the regression boundary. The corresponding Git tags resolve to different commits: 2.1.275 is 38035964a79edd8995a556e2027f891a826e533c, while 2.1.276 is 31a3b00bef145a0393d9dbf840a98674fec07712.
The npm registry also shows a rollout detail worth checking. At verification time, latest and next pointed to 2.1.276, while stable still pointed to 2.1.267. That is an observed package state, not a promise about Anthropic's future channel policy. An environment that installs @stable will therefore not prove this specific fix unless its resolved version is checked.
Diagnose before upgrading
Use the smallest classification table that can reject a false match:
| Observation | Likely meaning | Next action |
|---|---|---|
Claude Code 2.1.275, custom ANTHROPIC_BASE_URL, every request returns the exact advisor_20260301 400 |
Matches the documented regression | Test 2.1.276 against the same route |
| Direct gateway preflight fails before Claude Code is involved | Gateway, credential, or provider path is unhealthy | Fix the route first; a client upgrade is not evidence |
| Only one model, tool, or long prompt fails | Does not match the “every request” signature | Inspect gateway transforms and provider response |
| Version cannot be proven | Rollout state is unknown | Stop promotion and record the resolved package version |
Never paste tokens into logs. Record the credential source and header name, not the secret value.
A six-step recovery workflow
1. Capture the failing boundary
Record the Claude Code version, the sanitized gateway origin, the install channel, and one timestamped error. Keep one untouched 2.1.275 fixture long enough to demonstrate the original failure; otherwise the team may only prove that a later environment works.
claude --version
npm view @anthropic-ai/claude-code dist-tags --json
2. Preflight the gateway directly
Anthropic's gateway documentation recommends testing the /v1/messages path with a minimal one-token request. Use your gateway's required authentication header and a permitted model, but keep the response and request metadata sanitized. A failed direct preflight means the client version is not yet the primary variable.
3. Pin the corrected version
Avoid a floating channel during incident recovery:
npm install -g @anthropic-ai/claude-code@2.1.276
claude --version
Store both the requested and resolved version in the rollout receipt. If the binary is distributed through an image or developer environment, verify it inside that final runtime rather than on the build host.
4. Reuse the same route and credential source
Start a fresh session with the same ANTHROPIC_BASE_URL, proxy policy, model mapping, and non-secret credential source. For background agents, place required environment values in the supported settings configuration; a variable exported only in an interactive shell may not reach the worker.
5. Run four canaries
- Direct route: the minimal gateway request succeeds.
- Failure fixture: the preserved 2.1.275 environment reproduces the exact documented 400.
- Recovery fixture: 2.1.276 succeeds through the same gateway using a trivial prompt and then one representative tool call.
- Negative control: an intentionally invalid credential or disallowed route still fails, proving the gateway was not bypassed or weakened.
6. Promote in stages
Move one CI lane or a small developer group first. Watch status codes, provider route, latency, and tool-call failures. Expand only after the acceptance receipt is complete. Roll back if the exact 400 persists, if the direct preflight diverges from Claude Code, or if the negative control unexpectedly succeeds.
Copyable acceptance receipt
client_requested: 2.1.276
client_resolved: 2.1.276
previous_fixture: 2.1.275
gateway_origin:
credential_source:
direct_preflight: PASS | FAIL
2.1.275_exact_regression: REPRODUCED | NOT_REPRODUCED
2.1.276_basic_prompt: PASS | FAIL
2.1.276_tool_call: PASS | FAIL
negative_control: PASS | FAIL
decision: PROMOTE | HOLD | ROLLBACK
evidence_time_utc:
Common mistakes
- Upgrading to a floating tag without recording the resolved version.
- Treating any HTTP 400 as the documented 2.1.275 regression.
- Testing a direct Anthropic route while production uses a custom gateway.
- declaring recovery after one prompt without a tool-call canary and negative control.
- Exporting
ANTHROPIC_BASE_URLonly in a shell while background agents read settings-file environment values. - Printing headers or tokens into the incident receipt.
Building something? Turn your product page into a show people want to watch with PromoFast—hosted, embeddable, and ready to export.
FAQ
Should every Claude Code gateway user upgrade immediately?
Upgrade promptly if you are on 2.1.275 and match the exact custom-base-URL error. Other environments should still follow their normal staged rollout and verify the resolved version.
Does 2.1.276 prove my gateway fully supports Claude Code?
No. It fixes the documented client regression. Your gateway still needs correct authentication, endpoint forwarding, streaming, tool-use handling, and model mapping.
Can I remove the negative control after recovery?
Keep it in the rollout suite. A successful invalid request can reveal that the canary bypassed the gateway or that a policy boundary was weakened.
Sources
- Claude Code 2.1.276 release
- Claude Code 2.1.275 release
- Connect Claude Code to an LLM gateway
- LLM gateway protocol requirements
- Roll out an LLM gateway
- Official Claude Code npm package
Originally published on IndieSeek.
Top comments (0)