Skip to content

web/tui: restore session cost for flat-rate (Go) subscriptions #61712

Closed as duplicate

Description

@Plasmatron2627

Summary

OpenCode 2.2 removed the accumulated per-session cost figure for OpenCode Go (flat-rate) accounts and replaced it with usage-limit and reset information. On a flat-rate plan the dollar figure is notional, but it was the most useful signal on the screen: a number that only ever climbs, so a session running away is obvious at a glance. Token counts cannot replace it, because compaction resets the context while real spend keeps accumulating — a session can sit at "50k tokens" and still be burning.

Environment

  • opencode version: 2.2.5
  • OS: Linux 6.8.0-139-generic (linux x64)
  • Terminal: web UI in a browser (server mode, no TUI attached)
  • Shell: /bin/bash
  • Install/channel: latest
  • Active plugins: @nguquen/opencode-scheduler@1.6.3, @tarquinen/opencode-dcp@3.2.0

Reproduction

  1. Use an OpenCode Go (flat-rate subscription) account.
  2. Open any session and send messages that consume tokens.
  3. Look at the session header / status area.

Expected Behavior

An accumulated cost figure for the session, computed at list price, stays visible — as it did in 2.0.x.

Actual Behavior

The cost figure is gone in 2.2; the same area now shows plan usage limits and their reset time instead.

Request

Restore the accumulated session cost for flat-rate subscriptions, alongside (not instead of) the plan usage information. Either:

  • show both, or
  • add a setting such as showNotionalCost for providers where the cost is not billed per token.

Label it clearly as "at list price" so it is not mistaken for an invoice.

Additional Context

  • The figure was never a bill on a flat plan; it was a rate of burn indicator.
  • Use case: spotting a runaway session (loops, repeated tool calls, a long autonomous run) before it exhausts the plan's allowance.
  • Workaround available today is opencode stats, but it is a command you run, not a meter you glance at, and it does not track the live session.
  • I attempted a TUI status-line plugin, but the user works in the web interface, where CLI-only plugins do not render — so there is currently no way to get this number back in the browser UI.

Activity

  1. opencodejr commented on Nov 4, 2026

    @opencodejr

    Thanks for the clear write-up and the use case of spotting a runaway session.

    I think this is a duplicate of #59861. It asks for the same thing: an opt-in, clearly labelled estimate of session spend at catalog (list) prices for providers like OpenCode Go that report a $0 charge. Since 2.2.0 (#58562), OpenCode records the cost the endpoint reports, and Go reports $0 for usage included in the plan. That is why the figure disappeared.

    Possible duplicates and related issues, ordered by likelihood:

    You work in the web UI, which #59864 doesn't cover yet. It would help to add a comment on #59861 saying the web app needs the estimate too.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your request is different.

  2. opencodejr commented on Nov 5, 2026

    @opencodejr

    We didn't hear back, so I'm closing this as a duplicate of #59861. That issue asks for the same thing: an opt-in, clearly labelled list-price cost estimate for OpenCode Go sessions, which have reported $0 since 2.2.0.

    To follow progress, see #59861 and the open PR #59864. Right now the PR only covers the TUI, so a comment on #59861 saying the web UI needs the estimate too would help.

    If your request is different from #59861, reply here and we can reopen this. Thanks again for the detailed write-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions