anomalyco / anomalyco/opencode

TUI turn token summary mixes turn sums and last-step values on one line

Open
#46,636 0 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 1, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

With debug.turn_tokens enabled, each completed turn renders a collapsed summary line:

+ Tokens: 13 steps · 138,541 new · 136,448 cached · 137,605 total

#41922 deliberately mixed units here: new is summed across all steps of the turn, while cached and total are the final step's values ("summed new tokens across steps, and the final step's cached/total figures"). Nothing on the line marks that distinction, so the three numbers read as the same kind of aggregate when they aren't — for every individual step new + cached = total, but on the summary line it looks like a broken equation.

This is the same unlabeled mixing of usage totals and context-state numbers that #36515 flagged on the desktop counter.

Expected behavior

All three figures on the summary line should use one consistent unit (turn-level sums), since the last step's context is already visible in the expanded per-step table and on the status bar. Alternatively, keep last-step values but label them explicitly.

Environment
  • opencode v2 TUI, debug.turn_tokens enabled

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.