GeezerVison is showing github.com — [FEATURE]: Real-time token generation speed (tok/s) in TUI status bar, like Hermes · Issue #47914 · anomalyco/opencode
[FEATURE]: Real-time token generation speed (tok/s) in TUI status bar, like Hermes #47914DescriptionDescribe the enhancement you want to request
I want opencode to show real-time token generation speed (tok/s, tokens per second) while a response is streaming, like DeepSeek Hermes agent does.
Hermes shows it directly in the status bar, e.g.:
deepseek-v4-flash | 12.5K/128K | 68% | 3m 42s | 15.2 t/s
Reference implementations:
Proposed behavior in opencode
- TUI: live rolling tok/s while streaming (in the status line / session footer), plus final per-response average once complete (next to existing token counts).
- Desktop / web: same
t/s indicator for parity.
- Optional session-wide average (e.g. via
/stats or footer) for comparing models/providers.
- Config toggle, e.g.
display.show_output_speed (default off to avoid clutter), and hide when terminal width is too small.
Why
Alternatives considered
- Timing requests manually or benchmarking provider APIs directly — does not reflect real usage inside opencode.
- Only showing total tokens / cost after completion — no sense of live speed.
Activitygithub-actions commented on Sep 8, 2026 This issue might be a duplicate of existing issues. Please check:
Consider adding your thoughts and +1 to those issues rather than opening a new one. differs commented on Sep 9, 2026 Implementation notes from a hands-on attempt (opencode 1.18.29, Linux)
Third-party code currently has no supported way to render any of this, which is worth capturing in the design:
- No config/env toggle exists today for a live tok/s indicator.
@opencode-ai/plugin/tui advertises a slot/statusline host (TuiSlotMap incl. home_footer, session_prompt_right, app_bottom; api.slots.register, api.event.on), but the runtime does not deliver it: an auto-discovered plugin exporting tui is invoked with the server PluginInput and api.slots / api.event are undefined.
- The only rendering-ish control available to plugins,
client.tui.showToast, neither resolves nor draws when called from a plugin (awaits forever; no toast appears).
- Streaming events carry only cumulative
part.text (message.part.updated); real tokens.output arrives only on the final message.updated. For an accurate live rate, expose a per-message.part.delta token delta + timestamp (most providers stream usage; opencode currently drops it).
A minimal stop-gap for headless/scripted use (live ⇣ N tok/s + exact final average, calibrated on provider usage) is oc-meter — source shown in the now-duplicate #48067 and mirrored in the meter described there. Happy to turn it into a PR against whatever statusline surface wins here. opencodejr commented on Oct 28, 2026 Thanks for the detailed request and the Hermes references!
You're asking for a live tok/s figure while a response streams, a session-wide average for comparing models and providers, desktop/web parity and a display toggle.
Part of this is already in v2. The TUI shows each response's average throughput in the assistant message footer (e.g. Build · model · 4.0s · 20.0 tok/s). The session.tps setting turns it on or off, and it is on by default. If you don't see it, update with npm i -g @opencode/cli@latest.
The live rolling speed in the status line and the session-wide average aren't there yet. Maintainers will consider them.
Related issues:
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|