Search the documentation
3 pages for claude_code_subagent_prompt_cache_ttl.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Track cost and usage
Claude Code CLI · in the page
agent-sdk/cost-tracking
…en/settings-reference#promptcachettl) setting * Everything else: the `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL` environment variable, or the [`subagentPromptCacheTtl`](/docs/en/settings-reference#subagen…
How Claude Code uses prompt caching
Claude Code CLI · in the page
prompt-caching
…(/docs/en/settings-reference#subagentpromptcachettl) setting, or the `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL` environment variable Both settings and both environment variables require Claude Code v2.1…
Claude Code settings reference
Claude Code CLI · in the page
settings-reference
…5M`](/docs/en/env-vars) takes precedence over everything else, then [`CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`](/docs/en/env-vars), then this key, and last [`ENABLE_PROMPT_CACHING_1H`](/docs/en/env-vars…