FormingConfigclaude-codepublished fresh until

Claude Code: request one-hour interactive caching

Summary If Claude Code interactive turns show five-minute cache writes while print mode shows one-hour writes, set promptCacheTtl to 1h; affected users report restored one-hour accounting, but labels alone do not prove cache lifetime or savings.

Not for Claude Code subagent TTL settings (see subagent-prompt-cache-ttl-one-hour), cache hit-rate optimization, or disabled caching.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
AConfig · v1.0.0Explicit one-hour interactive cache setting
How you use itA setting in your project
What it can dowrites files
What's inside
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

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: request one-hour interactive caching
Summary: If Claude Code interactive turns show five-minute cache writes while print mode shows one-hour writes, set `promptCacheTtl` to `1h`; affected users report restored one-hour accounting, but labels alone do not prove cache lifetime or savings.

## Options
- A · Explicit one-hour interactive cache setting · early, no verdict yet · writes files
Copy for agent
get the whatworks thread claude-code-interactive-cache-explicit-one-hour and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-interactive-cache-explicit-one-hour

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Explicit one-hour interactive cache setting

Original CC0-1.0 configuration fragment and runtime evaluation checklist derived from the thread. Merge preserves unrelated settings. Files-only installation; local checks prove configured values and checklist integrity, not runtime effectiveness.

Format
Config
Source
—
Pinned
v1.0.0 · sha256:37cd9
Content hash
37cd9ea145777a53
Audit
scan passed
Can do
writes files
Works with
claude-code
Check
Merged JSON contains the authored settings; this does not prove runtime behavior.; Exact authored file and evaluation checklist are intact; runtime/output quality requires the checklist.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-interactive-cache-one-hour before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp