You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Real-time token display in TUI footer/header #17449
I'd like to take this on if there's interest. I filed #18968 (now closed as duplicate) with a concrete approach:
Add token stats to the existing footer component in packages/opencode/src/cli/cmd/tui/routes/session/footer.tsx. Three data points:
tok/s -- live output tokens-per-second during streaming, final rate shown briefly after completion
in -- cumulative input tokens for the session (compact K/M suffix)
out -- cumulative output tokens for the session
The data is already in the message store (message.data.tokens has input/output/reasoning/cache breakdowns). The footer subscribes to message events and accumulates totals.
I also filed #18969 proposing a tui.footer.items plugin hook so token-tracker plugins could use the footer instead of toasts. That one got the core label so it may be worth considering as the extensible approach.
Happy to submit a PR for either the built-in footer display or the plugin hook, whichever the team prefers.
Activity
github-actions commentedon Mar 14, 2026
This issue might be a duplicate of existing issues. Please check:
Please review these issues and consider adding a comment or reaction there instead of opening a new one.
andrewdunndev commentedon Mar 24, 2026
I'd like to take this on if there's interest. I filed #18968 (now closed as duplicate) with a concrete approach:
Add token stats to the existing footer component in
packages/opencode/src/cli/cmd/tui/routes/session/footer.tsx. Three data points:The data is already in the message store (
message.data.tokenshas input/output/reasoning/cache breakdowns). The footer subscribes to message events and accumulates totals.I also filed #18969 proposing a
tui.footer.itemsplugin hook so token-tracker plugins could use the footer instead of toasts. That one got thecorelabel so it may be worth considering as the extensible approach.Happy to submit a PR for either the built-in footer display or the plugin hook, whichever the team prefers.
feat(tui): add persistent token usage display in session footer
Tarquinen commentedon Apr 4, 2026
This can be done via plugin now, for example:
https://github.com/Tarquinen/oc-tps
FurryWolfX commentedon May 22, 2026
This can be done via plugin