- How you use it
- A setting in your project
- What it can do
- writes files
- What's inside
The option
| Option | AConfig · v1.0.0Explicit one-hour interactive cache setting |
|---|---|
| How you use it | A setting in your project |
| What it can do | writes files |
| What's inside |
What this thread does
ephemeral_5m_input_tokens Interactive turns show five-minute cache writes while print-mode runs on the same account show one-hour writes. Do first: merge "promptCacheTtl": "1h" into .claude/settings.local.json for a project-local override. Evidence status: affected users report this workaround; a reporter's traffic experiment implicates a keepalive beta, but it is not a maintainer-confirmed root cause. Not for: subagent cache TTL or an API request that never meets cache eligibility requirements.
Diagnostic: ephemeral_5m_input_tokens
1. Use this project-local setting, preserving other keys:
{
"promptCacheTtl": "1h"
}
2. Check for higher-priority TTL controls. The official caching docs put FORCE_PROMPT_CACHING_5M=1 first, then the bucket's environment variable, then its setting. An environment override can defeat the file value. 3. Send another ordinary interactive turn and inspect only that session's cache usage counters. Compare ephemeral_1h_input_tokens and ephemeral_5m_input_tokens; avoid exporting full transcripts. A cache hit with no new write cannot establish the requested write TTL.
What is known
The official docs support promptCacheTtl from 2.1.242 onward. Release 2.1.300 exists; it is a reported affected version, not a prescribed fix.
In issue #101685, the reporter's October 15 experiment associated five-minute accounting with cache-keepalive-2026-09-03; an explicit TTL omitted that beta and produced one-hour accounting. Another participant observed cache reads surviving longer than the five-minute label suggests. Treat accounting, actual retention, and billing impact as separate observations.
Public evidence
ist-shd, October 14, 2026: “without a restart”. Reply in #101685 reports that the explicit setting switched running affected sessions to one-hour writes. This is community reproduction, not a guarantee for every account.
Limits
Issue #101685 remains open. There is no independent trial result here, no guaranteed retention period, and no measured savings claim. Longer TTLs can change write costs for billed usage; consult the official caching docs before applying broadly. checked 2026-11-17.
Started from a post by @chrs-myrs, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.