Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
When telemetry is disabled (e.g., via DISABLE_TELEMETRY=1 or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1), sessions that would otherwise receive 1-hour prompt cache TTL appear to fall back to the 5-minute TTL instead.
What Should Happen?
Prompt cache TTL selection should be independent of telemetry. If a user/session would otherwise qualify for 1-hour prompt cache TTL, it should still receive it even when telemetry is disabled.
Error Messages/Logs
Steps to Reproduce
- Start a session with telemetry enabled.
- Confirm the session is using the 1-hour prompt cache tier.
- Start a comparable session with either
DISABLE_TELEMETRY=1orCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1. - Compare the cache metadata between the two sessions.
- Observe that the 1-hour TTL is no longer applied when telemetry is disabled.
Note: This may not be reproducible if using bedrock and ENABLE_PROMPT_CACHING_1H_BEDROCK=1 is set. I only tested with an Anthropic Claude Max plan.
What metadata to check:
In session transcripts, check the assistant response usage.cache_creation metadata for the prompt cache tier:
usage.cache_creation.ephemeral_1h_input_tokensusage.cache_creation.ephemeral_5m_input_tokens
If 1-hour TTL is active, ephemeral_1h_input_tokens should be non-zero.
If 5-minute TTL is active, ephemeral_5m_input_tokens should be non-zero.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.96
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
No response