claude-code - 💡(How to fix) Fix Feature request: surface prompt cache expiry status in CLI status bar [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52665Fetched 2026-04-24 10:42:59
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
2
Author
Participants
Timeline (top)
labeled ×4subscribed ×1

Add cache freshness visibility to the Claude Code CLI so users can make informed decisions about keep-alive messages vs. letting the cache lapse.

Root Cause

For users running expensive models (Opus) or long sessions with subagents, knowing when to send a keep-alive message vs. letting the cache lapse is currently a guessing game. The 5-minute TTL is documented but not surfaced anywhere in the interface.

Concrete workflow impact: when orchestrating multi-agent pipelines with background tasks, I routinely lose cache state between agent calls because I have no signal that expiry is imminent. A simple indicator would let me time a lightweight keep-alive message before the window closes — meaningful cost-control for sessions that run $10–50+ in cached tokens.

RAW_BUFFERClick to expand / collapse

Summary

Add cache freshness visibility to the Claude Code CLI so users can make informed decisions about keep-alive messages vs. letting the cache lapse.

Proposed UX (three tiers, pick any)

  1. Live countdown: "cache warm (4:23 until expiry)"
  2. Simple state indicator: green dot "cache warm" / yellow "expiring soon" / red "cache cold"
  3. Timestamp: last cache-touching API call shown in status line

Why this matters

For users running expensive models (Opus) or long sessions with subagents, knowing when to send a keep-alive message vs. letting the cache lapse is currently a guessing game. The 5-minute TTL is documented but not surfaced anywhere in the interface.

Concrete workflow impact: when orchestrating multi-agent pipelines with background tasks, I routinely lose cache state between agent calls because I have no signal that expiry is imminent. A simple indicator would let me time a lightweight keep-alive message before the window closes — meaningful cost-control for sessions that run $10–50+ in cached tokens.

Environment

Claude Code CLI, all platforms.

extent analysis

TL;DR

Implementing a cache freshness indicator in the Claude Code CLI will help users make informed decisions about sending keep-alive messages.

Guidance

  • Introduce a visible cache freshness indicator, such as a live countdown, simple state indicator, or timestamp, to inform users about cache expiry.
  • Choose an indicator that fits the CLI's UX and user workflow, considering the proposed options.
  • Ensure the indicator updates in real-time to reflect the cache's state, allowing users to plan keep-alive messages accordingly.
  • Consider the 5-minute TTL when designing the indicator to provide users with sufficient time to react.

Example

No code snippet is provided as the issue focuses on UX design and functionality rather than specific implementation details.

Notes

The solution should be tailored to the Claude Code CLI's existing architecture and user interface, ensuring a seamless integration of the cache freshness indicator.

Recommendation

Apply a workaround by introducing a simple state indicator, such as a colored dot, to provide users with a basic cache freshness signal, allowing them to make more informed decisions about keep-alive messages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING