Lab notes

Idle sessions still cost money

3 min read

The expensive session is not always the one you are staring at. It is the one you walked away from. Claude Code keeps the conversation on disk; the next turn can rewrite a cache at 1.25× or 2× the input rate even if you only meant to “check something.” TokensLab treats silence as a first-class signal, not a footnote.

By default a session is idle after 30 minutes without a new turn. That threshold is the same number used to cap “active time” on projects. A wall-clock span is useless here: one real session in our logs spans three weeks. Counting that as 545 working hours would make the burn rate a joke. Gaps longer than the idle cap are cut, so “how long was I actually working?” has an answer.

Alerts that do not punish you for opening the app

A naive notifier would fire once per dead session the moment you launch. The first machine we instrumented had 54 of them, all long dead. Fifty-four banners is not a product; it is an apology. The first pass only seeds. It records what already exists and stays quiet — except for the daily budget, because “you are already over today” is worth knowing the second the window opens.

When five sessions go idle in the same pass, TokensLab does not emit five notifications and does not silently drop four. It folds the burst into one OS alert, led by the costliest session, and counts the rest. The daily budget warns once per calendar day. A plain cooldown would re-warn every five minutes for the rest of the afternoon.

What you get back

  • A dashboard tile for idle sessions, next to live ones, so the waste is visible without opening a spreadsheet.
  • A Sessions filter for idle rows, with the same cache-aware dollars as the rest of the app.
  • A setting to change the idle window, and mutes per alert kind, so a noisy afternoon does not train you to ignore the bell.

Finance teams notice subscription line items. Engineers notice the session they forgot. TokensLab is built for the second case, which is usually where the first case comes from. Download the installer and let the idle list fill in from logs you already have.

WhatsApp All notes