Five agents, one hour of cache

CC 2.1.248 added experimental.cacheTtl to agent frontmatter. OrchestKit sets it to 1h on the five agents that idle past the default five-minute window. The numbers below come from two real fan-out runs on 2.1.251, read from the subagent transcript's per-message usage.cache_creation field, not from a claim.

Measured: where the subagent's cache writes landed

Before (no frontmatter)

ephemeral_5m: 254,554   ephemeral_1h: 0

Subagent ork:code-quality-reviewer, 8 API turns, cache read 602,252. Run cost $6.62 (list price).

After (cacheTtl: 1h)

ephemeral_5m: 0   ephemeral_1h: 253,346

Same prompt, same agent, 6 API turns, cache read 350,936. Run cost $7.08 (list price).

5-minute TTL writes 1-hour TTL writes

The main conversation was already on the 1h TTL in both runs (307,297 and 414,049 tokens), which is the session-level setting. The field moves only the subagent, which is exactly what it is for.

What it buys, and what it costs

A 1h cache write is priced at 2x the base input rate; a 5m write at 1.25x. Reads are 0.1x either way. The write premium is paid once per cache segment; the saving arrives on every resume after an idle gap longer than five minutes, where a 5m cache would have expired and the whole prompt would be rewritten. Drag the idle gap to see the break-even for one 250k-token subagent prompt.

SettingInitial writePer resumeTotal input cost units
5m (default)312,500
1h500,000

Which agents, and why these

AgentWhy it idles past 5m
security-auditorstage agent of the audit-full mapreduce workflow (security and dependencies modes)
system-design-reviewerstage agent of the same workflow (architecture mode)
eval-runnerwaits on eval datasets and grader runs
ci-cd-engineerwaits on CI runs between turns
code-quality-reviewerlong reviews, resumed by SendMessage after a maxTurns stop

Decision 2 of the adopt-all architecture page: four long-running agents was the recommended scope; the audit-full entry resolves to the two stage agents above. CC ignores 1h while a subscription is in usage overage, and reads the field only from subagent files. The repo's frontmatter parser (scripts/lib/parse-frontmatter.js) previously read any nested mapping as an empty array; it now parses one level, with a unit test, so the docs site sees the field too.