{"name":"CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL","slug":"claude-code-subagent-prompt-cache-ttl","family":"env","title":"Environment variables","noun":"environment variable","description":"You can pin the prompt cache to five minutes or an hour, separately for subagents.","description_source":"entry","described_by":{"version":"2.1.242","anchor":"prompt-cache-lifetime-is-now-configurable"},"presence":{"first_seen":"2.1.242","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":57,"mined_builds":150,"first_cited":{"version":"2.1.242","released_at":"2026-08-24 19:16:14","spans":1}},"aliases":[],"entries":[{"version":"2.1.300","anchor":"new-env-var-claude-code-messages-prompt-cache-ttl-added-to-a","heading":"New CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL environment variable","line":"A new environment variable, `CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL`, sits alongside the existing prompt cache lifetime settings","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.242","anchor":"prompt-cache-lifetime-is-now-configurable","heading":"Prompt cache lifetime is now configurable","line":"You can pin the prompt cache to five minutes or an hour, separately for subagents.","released_at":"2026-08-24 19:16:14","reason":"named in this entry, found in this entry's text"}],"entries_total":2,"docs":[{"source":"claude-code","path":"agent-sdk\/cost-tracking","title":"Track cost and usage","documented":false},{"source":"claude-code","path":"prompt-caching","title":"How Claude Code uses prompt caching","documented":false},{"source":"claude-code","path":"settings-reference","title":"All settings","documented":false}],"docs_total":3,"gates":[],"related":[{"name":"CLAUDE_CODE_SUBAGENT_PROMPT_SNAPSHOT","slug":"claude-code-subagent-prompt-snapshot","description":null}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-subagent-prompt-cache-ttl","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}