Cost and cache panel
Open the panel with /cost-panel. The footer line can also open it. The panel is available in Claude Code's CLI and desktop app; CLI button interaction may require /tui fullscreen, while keyboard shortcuts work without fullscreen. If the interface cannot draw a panel, the command can return a text report.
What the panel shows
- Session cost estimates the session's cost from observed token use, model, cache lifetime, and bundled list-price assumptions.
- Cache hit reports the share of input served from cache.
- Re-read per turn estimates the cost of reading the current context on another turn.
- Rebuild if cold estimates the cost of writing the context to cache again.
- Cache clock shows whether the cache is warm, nearing expiry, cold, or unknown.
- Context compares current context use with the model's context window.
- Hints can point to a task boundary, expiring cache, unexpected rebuild, large context, cheaper model, or large tool output.
- Cost per turn separates cache reads, cache writes, output, and uncached input for the latest turn.
- Saved by compacting estimates later-turn savings and subtracts the compaction request's cost. A new compaction can show a negative value before later turns offset it.
The footer line can show cache state, estimated rebuild cost, pending hints, and context share. Panel sections and footer fields can be changed in the panel's settings.
Read estimates carefully
These values are estimates, not provider invoices. They use observed usage and bundled price assumptions; actual charges or subscription usage depend on the selected model, provider, plan, negotiated rates, and context. A compaction request itself uses model tokens. compactly has no published, general measured savings result, and savings are not guaranteed.
Claude Code also has built-in usage and prompt-cache reporting. Its current documentation explains that displayed cost can be a local list-price estimate, and subscribers should use plan usage or authoritative billing information for their account. See Anthropic's cost documentation.
Coming back to a session
Prompt-cache expiry can make the next request reprocess context. compactly's cache indicators and hints help make that state visible; they do not change Claude Code's account limits or cache pricing. Use /clear when you want a fresh session without carrying its conversation forward.
View source on GitHub ยท Apache-2.0