Skip to content

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

Closed

Description

@heimoshuiyu

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

Activity

  1. Tarquinen commented on Oct 20, 2026

    @Tarquinen
    Member

    This was fixed by #46590. That PR merged into the v2 branch, so GitHub didn't close this issue automatically. Closing as completed.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions