Feature request: intermediate prompt cache TTL tiers (15m, 30m) for interactive use
Summary
The Anthropic API currently supports two prompt cache TTL values: 5m (300s) and 1h (3600s). For interactive Claude Code sessions, neither is a good fit:
- 5m expires during normal human interaction pauses (reading output, thinking, switching tabs). A user who pauses for 6 minutes pays a full cache rebuild — often 100K–900K tokens of cache creation at 1.25× base input rate.
- 1h is correct for sustained interactive work but costs 2× base input on every write. For short or bursty sessions, the write premium may exceed the amortized read savings.
Intermediate tiers — 15m and/or 30m — would cover the gap where most interactive pauses actually land.
The data
From our interceptor telemetry across 1,610 API calls over 61 hours on Max 5x:
- 89.6% of calls landed on the 1h tier
- 4 cold-start events (>100K cache creation tokens) occurred, each triggered by an idle gap crossing the TTL boundary
- Median inter-turn gap for interactive work: 2–8 minutes — well within a 15m window, frequently outside a 5m window
Community reports across #38335, #42052, and #45756 consistently describe quota drain accelerating after short idle gaps — the 5m TTL expiring during normal human pauses is a significant contributor.
What we're requesting
Add one or both intermediate TTL values to the /v1/messages API:
| TTL | cache_control.ttl value | Write multiplier (suggested) | Use case |
|-----|--------------------------|------------------------------|----------|
| 5m | 300 | 1.25× (current) | Automated/batch workloads |
| 15m | 900 | ~1.5× | Interactive with short pauses |
| 30m | 1800 | ~1.75× | Interactive with moderate pauses |
| 1h | 3600 | 2× (current) | Sustained interactive sessions |
The write multiplier suggestions are linear interpolations — actual pricing is Anthropic's call.
Why this matters for Claude Code specifically
Claude Code's querySource-based TTL selection (confirmed by @anthropics in the ScheduleWakeup tool description and by @AdrianBZG's #42052 response) currently makes a binary choice: 5m or 1h. A 15m tier would let Claude Code default interactive main-thread turns to a TTL that survives normal human pauses without the full 2× write cost of 1h — better aligning infrastructure cost with actual usage patterns.
Related
- #38335 — quota drain reports, many traced to 5m TTL expiring during normal pauses
- #42052 — 100% usage after light work, 5m TTL confirmed as contributor
- #45756 — quota exhaustion in 1.5 hours
- cnighswonger/claude-code-cache-fix#14 — configurable TTL per request type (interceptor-side workaround)
- @bcherny's HN comment confirming API customers can enable 1h
- @wadabum's observation that "neither 5 minutes nor 1 hour seems right" for interactive use