Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.242 ·

Prompt cache lifetime is now configurable

You can pin the prompt cache to five minutes or an hour, separately for subagents.

Use it now Notable New Features
JSON All of v2.1.242
Use it nowTier: how much it should matter to you
4Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
PerformanceArea: what it touches
New FeaturesKind: in v2.1.242,
What probably matters to youSection of the release
What

Two new settings, promptCacheTtl and subagentPromptCacheTtl, pin the prompt cache to "5m" or "1h". The first covers the main conversation (interactive, -p and SDK turns and the helpers that run inline with it), the second covers subagents, workflows and background requests. CLAUDE_CODE_PROMPT_CACHE_TTL and CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL override the settings. No experiment gate; available to everyone on this build.

Details
  • Unset means automatic: 1 hour on a Claude subscription within usage limits, 5 minutes on an API key, Bedrock, Vertex or Foundry for the main conversation; 5 minutes for subagents unless ENABLE_PROMPT_CACHING_1H=1.
  • Resolution order is FORCE_PROMPT_CACHING_5M, then the environment variable, then the setting, then the 1h environment flags.
  • Both environment names were added to the allowlist, and request telemetry gained prompt_cache_ttl and prompt_cache_ttl_reason.
Usage
# in settings.json
{ "promptCacheTtl": "1h", "subagentPromptCacheTtl": "5m" }

# or per run
CLAUDE_CODE_PROMPT_CACHE_TTL=1h claude
Evidence

CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL, Prompt cache TTL for the main conversation (interactive, -p and SDK turns, plus the helpers that run inline with it), Prompt cache TTL for the main conversation (interactive, -p and SDK turns, plus the helpers that run inline with it): "5m" or "1h".

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Read from
How sure we are
One source agreesOne thing we can check says the same as this entry.
The name it cites is new in this buildNew in this build: CLAUDE_CODE_PROMPT_CACHE_TTL

See this entry in the whole of v2.1.242 →

Feedback