Skip to content

feat(app): count the reloaded conversation in a turn's tokens - #89

Merged
httpsphl merged 2 commits into
mainfrom
feat/tokens-reloaded-in-total
Oct 1, 2026
Merged

httpsphl merged 2 commits into
mainfrom
feat/tokens-reloaded-in-total

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 1, 2026

Copy link
Copy Markdown
Owner

On top of #88 (same strings): until #88 merges, its commit shows here too.

The conversation sent again after a pause is real spending of the Claude plan, and the separate "reloaded" count next to the total confused people. Botloft now shows one number with everything the bot spent: input + cacheWrite + output.

  • Chat: the turn line reads "Done in 4.2 s · 73.6k tokens", without "reloaded the conversation (72k)". The tooltip reads "Read 72.6k tokens and wrote 983" ("new" dropped, as the count now includes the conversation sent again).
  • Usage dialog: no "reloaded" in the rows or the total; the bots are ordered by the new number.
  • The daemon still records reloaded in the turn item; only the app stops showing it and subtracting it. Spec 8.7 says so, with the reason.

A short turn after a pause now shows a large number. That is the true cost.

Tests

  • Chat and usage tests updated; the test that a small reload went unmentioned is gone.
  • cargo fmt, clippy -D warnings, cargo test --workspace and pnpm check pass locally.

Manual check

With the real Claude Code: leave a bot idle for more than the cache lifetime, then send a short message. The turn line shows one large number with no "reloaded" part, and Usage has no "reloaded".

…rsation

The reread count next to the spent one confused people. The chat's turn
line tooltip and the usage dialog drop it; the conversation sent again
after a pause still shows apart. cacheRead is still stored and summed.
The conversation sent again after a pause is real spending of the plan,
and the separate "reloaded" count next to the total confused people.
The turn line, its tooltip and the usage dialog now show one number,
input + cacheWrite + output. The daemon still records reloaded.
@httpsphl
httpsphl enabled auto-merge October 1, 2026 12:14
@httpsphl
httpsphl merged commit 7272fee into main Oct 1, 2026
3 checks passed
@httpsphl
httpsphl deleted the feat/tokens-reloaded-in-total branch October 1, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant