GeezerVison is showing github.com — [FEATURE]: Real-time token display in TUI footer/header · Issue #17449 · anomalyco/opencode
[FEATURE]: Real-time token display in TUI footer/header #17449DescriptionFeature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
Currently, OpenCode only displays token statistics after a request completes (in the header's ContextInfo component). During streaming:
- No real-time token count is shown
- No progress indicator is displayed
- Users have no way to know if the system is processing or stuck
This is particularly problematic for:
- Long reasoning tasks (especially with thinking models)
- Large context windows
- Slow network connections
Request
Add real-time token display in the TUI footer or header that updates during streaming, similar to Claude Code's behavior. This would show:
- Estimated token count - Based on character count during streaming
- Visual activity indicator - Show that the system is actively processing
- Output rate - Tokens per second (optional, but helpful)
Activitygithub-actions commented on 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 commented on 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:
- 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. Reacted by Ivan Krapivtsev and aryoda added a commit that references this issue on Mar 25, 2026This issue will close once commit 7cb34ff is merged into the 'dev' branch.7cb34ff Tarquinen commented on Apr 4, 2026 FurryWolfX commented on May 22, 2026 This can be done via plugin
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|