What probably matters to youSection of the release
Unclear It is unclear whether the main conversation is still cached at all when this variable overrides a one-hour lifetime, since one request path then drops its cache marker.
What
The prompt cache lets the model reuse earlier parts of a conversation instead of processing them again, for a set time called the TTL (time to live). CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL is a new environment variable, a setting handed to Claude Code when it starts:
When it equals 5m, the main conversation's cache TTL is forced to 5 minutes. Otherwise the usual TTL, 1h or 5m, is used unchanged.
When the variable would change the TTL, the main conversation no longer gets its usual cache setting.
It is a separate control from CLAUDE_CODE_PROMPT_CACHE_TTL and FORCE_PROMPT_CACHING_5M, so you can shorten caching for the main conversation's messages on their own.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is unclear whether the main conversation is still cached at all when this variable overrides a one-hour lifetime, since one request path…