[DOCS] LLM gateway docs missing `x-client-request-id` header for timeout debugging

Open 💬 4 comments Opened Mar 26, 2026 by coygeek

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/llm-gateway

Section/Topic

"Gateway requirements" request-header guidance, plus the related proxy/timeout troubleshooting guidance

Current Documentation

The closest existing documentation currently says:

1. Anthropic Messages: /v1/messages, /v1/messages/count_tokens Must forward request headers: anthropic-beta, anthropic-version 3. Vertex rawPredict: :rawPredict, :streamRawPredict, /count-tokens:rawPredict Must forward request headers: anthropic-beta, anthropic-version Failure to forward headers or preserve body fields may result in reduced functionality or inability to use Claude Code features.

The troubleshooting page currently says:

Behind a proxy: corporate proxies can interfere with API requests. See network configuration for proxy setup.

The monitoring page currently says:

The prompt.id attribute lets you tie all of those events back to the single prompt that triggered them.

No code.claude.com page currently mentions x-client-request-id or explains how to use it when debugging timed-out API requests.

What's Wrong or Missing?

Changelog v2.1.84 added an x-client-request-id header to API requests specifically for debugging timeouts, but the docs do not explain:

  1. That Claude Code now sends this header automatically on API requests
  2. What problem it solves (correlating timed-out requests across Claude Code, proxy/gateway logs, and related telemetry)
  3. Where operators should look for it when investigating timeout failures
  4. How this request-level identifier relates to the existing prompt-level correlation guidance in the monitoring docs

Because the docs already discuss request headers, proxies, and event correlation separately, this omission makes the new timeout-debugging surface effectively undiscoverable.

Suggested Improvement

Add a short note to the LLM gateway and network troubleshooting docs such as:

Claude Code includes an x-client-request-id header on API requests. When debugging request timeouts through a proxy or LLM gateway, capture this header in your logs so you can correlate the affected request across systems.

Also add a brief troubleshooting note explaining that if a request hangs or times out behind a proxy/gateway, users should check logs for the matching x-client-request-id value and include it when escalating the issue.

Optionally cross-reference the monitoring page so operators can distinguish prompt-level correlation (prompt.id) from HTTP request-level correlation (x-client-request-id).

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/llm-gateway | Gateway requirements enumerate forwarded request headers but omit x-client-request-id |
| https://code.claude.com/docs/en/network-config | Proxy setup page is the natural place to explain capturing or logging the header during timeout investigations |
| https://code.claude.com/docs/en/troubleshooting | Proxy/API request troubleshooting gives no request-correlation guidance for timeouts |
| https://code.claude.com/docs/en/monitoring-usage | Documents prompt.id event correlation but not the HTTP request header introduced for timeout debugging |

Total scope: 4 pages affected

Source: Changelog v2.1.84

Exact changelog entry:

Added x-client-request-id header to API requests for debugging timeouts

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗