[Bug] Telemetry events competing with API requests for rate limit budget
Bug Description
Key findings:
- Token count is tiny: autocompact: tokens=52172 threshold=967000 - you're at 52K tokens out of 980K. This is NOT
a token-based rate limit.
- 589 deferred tools, only 1 sent: Dynamic tool loading: 1/589 deferred tools included - so the tools aren't the
problem, confirmed.
- Rejections happen in ~19ms: Request sent at 19:51:19.989, rejected at 19:51:20.008. That's a
gateway/load-balancer rejection - it's not even reaching the model.
- Both "Type 2a" AND "Type 2b" within seconds: You're hitting two different rate limit buckets in rapid
succession.
- THIS IS THE BIG ONE - Claude Code's own telemetry is ALSO getting 429'd:
1P event logging: 39 events failed to export (status=429)
1P event logging: 80 events failed to export (status=429)
- Claude Code is firing batches of 39-80 telemetry events to the same API endpoint, and those are competing with
your actual requests for rate limit budget.
- The cloudflare-api MCP server is in a retry loop hammering Cloudflare ("No token data found" every ~1.3 seconds
for 40+ attempts), which may also be contributing noise.
The smoking gun is #5. Anthropic's own internal telemetry events are eating your rate limit. When you type
"continue," Claude Code fires off telemetry AND your API request simultaneously, and the telemetry batch can
starve the actual request.
This is a bug in Claude Code, not a problem with your usage. You should file this with the request IDs from the
log:
- x-client-request-id=8c33ac75-4a82-4f52-96f3-2ee7185e220a (Type 2a)
- x-client-request-id=53813b82-4fd3-4fc2-bb8e-e82308f2fd9e (Type 2b)
Environment Info
- Platform: darwin
- Terminal: WarpTerminal
- Version: 2.1.92
- Feedback ID: 3c6cf0dd-dca2-4ca0-a619-6918486d2db5
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/coreydylan/.local/share/claude/versions/2.1.92 (expected in multi-process scenarios)\n at im_ (/$bunfs/root/src/entrypoints/cli.js:1884:2153)\n at An6 (/$bunfs/root/src/entrypoints/cli.js:1884:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T19:47:41.423Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at lAH (…
Note: Content was truncated.
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Update: mitmproxy capture proves this is NOT a quota issue
Captured full HTTP traffic using mitmproxy (
mitmdump --set flow_detail=3) routed viaHTTPS_PROXY+NODE_EXTRA_CA_CERTSto inspect every request/response between Claude Code and the Anthropic API.Evidence
Last successful request immediately before the 429:
The very next request, seconds later:
Why this proves it's a bug
status: allowedon the preceding request. Nowhere near any quota limit.Retry-After: 0— the server tells the client to retry with zero delay. A real rate limit would have a nonzero retry-after value.anthropic-ratelimit-unified-*headers on the 429 — the unified rate limiter never evaluated this request. Something upstream (Cloudflare gateway? load balancer?) is rejecting it before it reaches the actual rate limiter.``
``19:51:20.008 - Type 2a rate limited (x-client-request-id: 8c33ac75-4a82-4f52-96f3-2ee7185e220a)
19:51:33.342 - Type 2b rate limited (x-client-request-id: 53813b82-4fd3-4fc2-bb8e-e82308f2fd9e)
19:51:36.541 - Type 2a rate limited
19:51:37.795 - Type 2a rate limited
19:51:38.979 - Type 2b rate limited
19:51:40.146 - Type 2b rate limited
19:51:41.317 - Type 2b rate limited
``
``1P event logging: 14 events failed to export (status=429)
1P event logging: 39 events failed to export (status=429)
1P event logging: 80 events failed to export (status=429)
Internal Claude Code telemetry batches appear to be competing for the same rate limit budget as actual API requests.
Additional noise: cloud-managed MCP server retry storm
The cloud-managed
cloudflare-apiMCP server (fetched fromapi.anthropic.com/v1/mcp_servers) generated 234 log entries in a single session, retrying "No token data found" every ~1.3 seconds for the entire session duration before eventually disconnecting. This server has no configured OAuth token and cannot connect, but it retries indefinitely.Environment
Request IDs for server-side lookup
6a91fd1c-6d09-42f1-841f-c5ae82c9530a(200 OK, shows 4% utilization)8c33ac75-4a82-4f52-96f3-2ee7185e220a(429 Type 2a)53813b82-4fd3-4fc2-bb8e-e82308f2fd9e(429 Type 2b)Reproduction
Additional context
This issue reproduces on two separate machines (MacBook Pro and MacBook Air via SSH), and on multiple networks, so this is not a local configuration or network-specific issue.
One potentially relevant detail: around the time this started, I set up Syncthing to sync Claude Code conversation history (
~/.claude/history.jsonland related session files) between the two machines. I'm not sure how or if this could contribute — the sync only touches local files, not API requests — but it's the only environmental change that coincides with the onset of this issue. Mentioning it for completeness in case thedevice_idorsession_idin the API metadata (visible in the mitmproxy capture) could cause server-side rate limit bucket confusion when history is shared across devices.Update: Confirmed NOT a client configuration issue
Ran a definitive test: emptied
~/.claude/mcp.json(zero MCP servers) and~/.claude/settings.json(zero hooks, zero plugins, zero env vars). Started a completely clean Claude Code session:Result: 429 "Type 2a rate limited" after just 2 messages.
This rules out:
Also tested with multiple Anthropic accounts on the same machine — same issue. And the issue reproduces on two different machines across multiple networks.
The only constant is Anthropic's API gateway. Combined with the mitmproxy evidence (4% utilization,
Retry-After: 0, noanthropic-ratelimit-unified-*headers on the 429, 19ms rejection time), this is definitively a server-side issue in the gateway/load-balancer layer that sits in front of the actual rate limiter.Closing — figured out the root cause on my end. Thanks!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.