Silent 429 on context-1m-2025-08-07 beta after model switch — no rate-limit headers, no retry-after
Summary
Switching from claude-sonnet-4-6 to claude-opus-4-7 with the context-1m-2025-08-07 beta (/model claude-opus-4-7[1m]) in a session with an existing Sonnet prompt cache causes the first request to trigger a persistent HTTP 429 that:
- Returns no
anthropic-ratelimit-*headers - Returns no
retry-afterheader - Body is only
{"type":"error","error":{"type":"rate_limit_error","message":"Error"}} - Persists exactly ~71 minutes (matches
ephemeral_1hTTL), regardless of client behavior - Blocks Opus/Sonnet; Haiku keeps working
Environment
- Claude Code CLI
2.1.114 - Auth: OAuth (Claude Max)
- Date: 2026-04-19, 15:26–16:37 UTC
Reproduction
- Session with
claude-sonnet-4-6, ~100k tokens of prompt cache built up /model claude-opus-4-7[1m]- Next prompt → 429
Evidence
Last successful Sonnet request (15:23:57 UTC):
{"model":"claude-sonnet-4-6","usage":{"cache_read_input_tokens":106561,"ephemeral_1h_input_tokens":258}}
Model switch 15:24:16 UTC → first 429 at 15:26:00 UTC:
HTTP 429, headers: {} (empty), body: {"type":"error","error":{"type":"rate_limit_error","message":"Error"},"request_id":"req_011CaDT7QKiJjeuzkvXd2JNG"}
First successful Opus request (15:27:26 UTC) reveals the trigger:
{"model":"claude-opus-4-7","usage":{"cache_creation_input_tokens":209698,"cache_read_input_tokens":0,"ephemeral_1h_input_tokens":209698}}
→ 209,698 tokens of fresh ephemeral_1h cache creation because the Sonnet cache cannot be read by Opus. 60 consecutive 429s over 71 min, all empty headers, all generic "Error". Recovery auto-releases exactly at T+71min (ephemeral_1h TTL).
Request IDs (first/last): req_011CaDT7QKiJjeuzkvXd2JNG / req_011CaDTWPsKMpq3gpyGcSS5o
Hypothesis
The context-1m-2025-08-07 beta has its own enforcement layer that omits standard rate-limit metadata and releases only on ephemeral_1h slot expiry, not on volume drop.
Impact
- Undebuggable (generic
"Error") - Breaks SDK retry logic (no
retry-after) - 70+ min lockout from one oversized request
- Looks like a partial outage to users (Haiku works, Opus/Sonnet don't)
Suggested fixes
API:
- Include
anthropic-ratelimit-*+retry-afteron beta-enforcer 429s - Specific error message:
"1h prompt cache quota exceeded, retry in N seconds"
Client (Claude Code):
- On
/modelswitch mid-session, either warn about cache-miss cost or auto-downgrade first request'sephemeral_1htoephemeral_5m
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗