Setting ANTHROPIC_BASE_URL (even a pass-through proxy) drops dispatch + message threads and nearly disables parallel tool calls
Summary
When ANTHROPIC_BASE_URL points anywhere other than the default (even a byte-for-byte
pass-through proxy to api.anthropic.com), Claude Code 2.1.282 stops sending two
first-party features, and the model almost stops making parallel tool calls. Setting_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL=1 does not restore either feature.
What changes on the wire
With a custom base URL, Claude Code no longer sends:
- the
anthropic-dispatch-id: v2dheader - message threads: the
thread: {create|continue}request field and the betas
message-threads-2026-08-12 and mid-conversation-system-clear-at-2026-08-21
System prompt, tools, thinking and effort settings are otherwise identical.
Effect (headless claude -p, Sonnet 5, subscription OAuth, same task and repo)
| Condition | Sessions with any parallel tool call | Tool calls per turn |
|---|---|---|
| Default base URL | 6/6 | 1.56 |
| Pass-through proxy base URL + _CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL=1 | 1/7 | 1.03 |
| Same proxy, both features forced back via internal env switches | 4/4 | 1.67 |
| Same proxy, threads only forced back | 0/4 | 1.00 |
| Same proxy, dispatch only forced back | 1/4 | 1.09 |
On a task that reads several files and fetches a URL, the serial sessions need roughly
twice as many requests, so gateway and proxy users pay more for the same work.
Repro
- Run a local HTTP proxy that forwards every request unchanged to https://api.anthropic.com.
- Run the same
claude -p "<multi-file task>"twice: once with no base URL, once with
ANTHROPIC_BASE_URL=http://127.0.0.1:<port> and _CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL=1.
- Count assistant messages with more than one
tool_useblock, and compare the
request headers and bodies captured at the proxy.
Ask
- Gate these features on something other than the base URL, or honour
_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL=1 for them, so compliant pass-through
proxies and gateways get the same model behaviour.
- For message threads specifically, a gateway that needs full history per request
would benefit from a documented way to keep full-history requests while retaining
the parallel-call behaviour.
Environment
- Claude Code 2.1.282, headless
claude -p - Model: claude-sonnet-5, subscription OAuth
- macOS
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗