Skip to content

[FEATURE]: Desktop 2.0 must ship built-in session metrics (tokens/sec + cache hit rate) — no UI plugin path exists #52029

Closed as not planned

Description

@vokasug

Summary

OpenCode 2.0 has no UI plugin support in the desktop app, so session telemetry that is baseline in competing agents — token throughput, prompt-cache hit rate, and session token/cost totals — can only ever come from the app itself. Right now the desktop app ships none of it, and because 2.0 deliberately removed the UI extension path, this can no longer be filled in by the community. It has to be built in.

Why this is 2.0-critical (not a plugin gap)

In OpenCode 2.0 the plugin surface is split: server plugins add tools/hooks, and only CLI/TUI plugins (@opencode/plugin/tui, OpenTUI renderables) can draw UI, in the terminal. The desktop app is a separate client with no UI extension points at all. Every existing metrics plugin — oc-tps, the cache-hit sidebar panels, usage panels — is TUI-only and cannot render in desktop. So the usual "someone will make a plugin" answer does not apply here: if the app does not build it, desktop users never get it.

Baseline in comparable tools

Token and cache visibility is table stakes in this category:

  • Claude Code: /context breakdown and a statusline that surfaces tokens, cost, and session data.
  • Codex CLI: token usage in /status and the footer.
  • Cursor: per-session token and cost meter.
  • OpenCode's own TUI: built-in per-response t/s in the assistant footer, plus an ecosystem of live TUI panels.

Desktop is the only OpenCode surface — and effectively the only client in this class — without it.

What the desktop app is missing

  • Tokens per second: live while streaming, settled per response.
  • Prompt-cache hit rate, cache read, cache write.
  • Session-level input / output / reasoning / cache totals.
  • Context saturation beyond the current on-hover numbers.

The desktop context/usage indicator already shows cost, context %, and token counts on hover, so this is an extension of an existing surface, not new chrome.

Proposal

  1. Add live and settled t/s to the desktop context/usage indicator. Use the same math as the TUI: estimate from output + reasoning deltas during streaming, settle to an exact rate from reported usage over the stream span when the step ends.
  2. Add prompt-cache hit rate and cache read/write to the same hover/panel.
  3. Optional session metrics panel: in/out/reasoning/cache totals, cost, context %, and t/s folded across the session family (parent + subagents).

An opt-in display setting is fine; the default should match what other agents show.

Related

Additional context

Filed because 2.0 closed the plugin route for desktop UI. Without a built-in implementation there is no path for desktop users to see this data in-app; the only workaround today is running a separate TUI instance alongside the desktop app.

Activity

  1. github-actions commented on Sep 29, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The feature request template requires a verification checkbox confirming the feature has not already been suggested; that checkbox is missing. Please add and complete it after checking the related issues below.
    • Include relevant system details, such as the OpenCode Desktop version and operating system, to help assess the request.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    • #49380: requests tokens-per-second in the Desktop context usage indicator, directly overlapping the proposed throughput metric.
    • #50000: requests live tokens-per-second in both TUI and Desktop.
    • #34900: requests Desktop context usage including cached-token information, overlapping the cache/context metrics.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Sep 29, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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