Skip to main content
AI RADARVibe Coding
251•10/11/2026, 07:16•2 min read

Extend Claude Code subagent prompt cache TTL

Executive TL;DR30s read

Claude Code's subagent cache lasts only 5 minutes by default, but a setting can extend it to 1 hour—though testing is recommended before changing it.

By default, the subagent cache in Claude Code lasts for only 5 minutes. This means that if a subagent remains idle for more than 5 minutes, you lose the ability to use the cache at a reduced price.

You can change this behavior with the following setting:

JSON
"subagentPromptCacheTtl": "1h"

However, Boris Cherny notes that the default settings work well for most users. Therefore, before changing this parameter, it is worth testing it and measuring the results.

You can run this script to evaluate whether increasing the subagent cache lifetime to 1 hour will save money.

Why it matters

Analysis

A longer TTL can reduce prompt cache costs for long-running or interrupted subagent workflows, but the savings depend on actual usage patterns.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills