Guide sections

11 Work

Cost and usage

ShanFlow shows how much of the context window a session has used, how many tokens it has spent, and how much of your plan's usage limits you have used. It has no spending limit or budget feature. The only limits are the ones your plan or provider sets.

Check a session's context and tokens#

The title bar shows the context size (for example 44k) and a thin bar. Hover over it, or click it to keep the popover open.

The context and usage popover: 4% of 1.0M, auto-compacts at 400k, 356k left, session total 162k tokens and a costThe context and usage popover: 4% of 1.0M, auto-compacts at 400k, 356k left, session total 162k tokens and a cost

For a Claude session the popover shows:

  • The share of the context window used, and the window size.
  • Auto-compacts at the size where the session compacts itself, and how much is left. The slider in the bar sets this threshold. It is not a cost limit. See Context and memory.
  • Last compaction and Last cold write, each with a link to the usage view.
  • Session total: the tokens used, with the dollar cost. Hover for the note Estimate. The total includes tokens spent in side chats.

A Codex session shows the window as Codex reports it, and Session total shows tokens (input plus output) without a dollar figure. If a session uses a third-party provider model, the total reads billed via that provider instead of a cost.

The Cost row in the Details panel (⌘I / Ctrl+I) shows the same session total for a Claude session. You can also type /usage (or /cost) in the composer.

What the cost means#

The dollar figure is an estimate worked out from token counts at list prices. It is not a bill. If you use a Claude or ChatGPT plan, your plan covers the usage, and the figure only tells you how heavy a session was. Where an engine reports no price, ShanFlow shows tokens only.

See how much of your plan you have used#

The plan usage box sits at the bottom of the sidebar. It shows your tightest limit as one line: a percentage, a bar and the time until it resets.

  • Click it, or its small arrow, to open Show all limits. For Claude this lists the 5-hour limit, Weekly · all models and the model-specific weekly limits your plan has. Codex shows its own windows.
  • When both engines are signed in, the box is captioned with the engine's name, and the full view lists the other engine as one line. Click that line to switch to it.
  • Click Hide plan usage (the ✕) to fold it away. A small clock handle brings it back. If a window is nearly full, the handle says so.

Plan usage is read from your account, so it appears for plan sign-ins. If you use an API key, there is no plan window to show.

When you reach a limit, the thread says so. A session on one engine offers a Continue on button for the other engine, so you can carry on while the first resets.

Read the Insights dashboard#

Insights summarizes your usage across all sessions, computed from the transcripts on your computer.

  1. Click Insights in the sidebar, or choose Go › Insights from the menu.
  2. Pick a window: Today, 7d, 30d or All time. It applies to everything below it.
  3. Click Refresh to recompute.
The Insights dashboard with the plan usage card, token and cost tiles, and the usage-over-time chartThe Insights dashboard with the plan usage card, token and cost tiles, and the usage-over-time chart

The dashboard has:

  • Plan usage: your limits with their reset times, and the week's usage curve. The card is tagged Included because your plan covers it.
  • Tokens, Cost, Sessions and Warm reads. Cost is labeled at list price and its hover says Not a bill. Warm reads is the share of input served from the prompt cache. A warm read costs about 10 times less than a cold one.
  • Usage over time, by day or hour, switchable between Tokens and Cost.
  • Where tokens concentrate, grouped by model or by type.
  • Guardrails, measured: how many times auto-compaction ran and the re-reading it saved (Claude only).
  • When work happens: active days, peak hour and a day-by-day grid.
  • Top sessions and By project. Click a row to open that project's usage detail.

With both engines in use, a switch at the top filters the dashboard to Claude, Codex or all. The dashboard is local. Opening it sends nothing anywhere.

Keep usage down#

  • Compact before a long run rather than after.
  • Leave a session idle for as little as you can between turns. A session that sits idle past the cache's lifetime has to re-read its whole context, which Insights counts as a cold re-read.
  • Use Auto-compact when idle in the session's row menu to compact an idle session for you (Claude sessions).
  • Check Top sessions to find the sessions that spend the most.