anomalyco / anomalyco/opencode

[FEATURE]: tokens-per-second in the desktop app (context usage indicator)

Open
#49,380 1 comment 1 reaction 1 assignee View on GitHub

@Hona is already working on this.

Since Sep 16, 2026.

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

Description

Summary

The desktop app has no tokens-per-second readout. The TUI has a built-in per-response t/s in the assistant footer (plus a plugin ecosystem for live indicators), but desktop users cannot see throughput while agents run. The existing context usage indicator already surfaces cost, context usage %, and token counts on hover; adding tok/s there closes the gap with minimal UI.

Environment

  • opencode version: 0.0.0-beta-19425 (desktop beta)
  • OS: macOS 26.6.2 (Darwin 25.6.0, arm64)
  • Install/channel: desktop beta app
  • Plugins: none relevant — the desktop app has no plugin UI extension points

Proposal

Show live and settled tokens per second in the desktop app's context usage indicator (the progress circle in the session header and message timeline):

  • While streaming: an estimated live rate (e.g. ~51 t/s), counting output + reasoning deltas.
  • When the model step ends: settle to an exact rate from reported usage over the stream span, matching the TUI's built-in math.
  • On hover (where cost, context %, and total tokens already appear): include the last measured rate.
  • No new chrome; an optional display setting if needed.

Why this can't be a plugin

Desktop UI extension is not supported today: the UI plugin slots (@opencode/plugin/tui, OpenTUI renderables) are terminal-only, so only the app itself can add this.

Prior art

  • TUI has built-in assistant-footer t/s; accuracy follow-ups tracked in #48705 and PR #48689. TUI feature requests: #43857, #47914.
  • Desktop PR #42372 ("feat(app): show tokens-per-second in context usage indicator", 2026-08-13) implemented exactly this and was closed on 2026-09-13 by the automated stale-PR cleanup (age > 1 month, fewer than 2 positive reactions) rather than on technical merit. Filing this issue so the work is tracked and can be revived or re-landed.

Additional context

Desktop sessions on this machine stream at rates where a live readout is genuinely useful (~50–180 t/s depending on model and step), and the only current workaround is a separate TUI instance or a home-grown sidecar.

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.