GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(tui): persistent token usage display in session footer · Issue #18968 · anomalyco/opencode

feat(tui): persistent token usage display in session footer #18968

New issue
Copy link
New issue
Copy link
Closed
Closed
feat(tui): persistent token usage display in session footer#18968
Copy link
Assignees
thdxr
Labels
needs:complianceThis means the issue will auto-close after 2 hours.opentuiThis relates to changes in v1.0, now that opencode uses opentui

Description

@andrewdunndev
andrewdunndev
opened on Mar 24, 2026
Issue body actions

I'd like to see token usage in the session footer as a persistent display rather than relying on toast notifications from plugins. The footer already shows directory, LSP count, MCP count, and permissions. Token usage fits naturally here.

What I'm imagining:

~/project                                    142 tok/s · 4.5M in · 19K out · • 2 LSP · ⊙ 1 MCP

Three data points:

  • tok/s -- live tokens-per-second during streaming (fades or shows last value when idle)
  • in -- cumulative input tokens for the session (compact: K/M suffix)
  • out -- cumulative output tokens for the session

The data is already available in the message store (message.data.tokens has input, output, reasoning, cache breakdowns). The footer component (packages/opencode/src/cli/cmd/tui/routes/session/footer.tsx) would subscribe to message events and accumulate the totals.

For the tok/s calculation: track output tokens and elapsed time during the streaming phase of each assistant turn. Display the rate while streaming, show the final rate for a few seconds after completion, then hide or show "idle".

This is useful for understanding context consumption during long sessions and for comparing model performance across providers.

Happy to submit a PR.

Activity

  1. github-actions
    assigned
    thdxr
    on Mar 24, 2026
  2. github-actions
    added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 24, 2026
  3. github-actions commented on Mar 24, 2026

    @github-actions
    github-actionsBot
    on Mar 24, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Feature requests must use the **[FEATURE]: ** prefix in the title (e.g. [FEATURE]: persistent token usage display in session footer)
    • The issue should use the Feature Request template, which includes a verification checkbox confirming you searched for existing issues

    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:

    • [FEATURE]: Real-time token display in TUI footer/header #17449: Real-time token display in TUI footer/header
    • [FEATURE]: Display token usage information in the TUI #13003: Display token usage information in the TUI
    • [FEATURE]: Adding Experimental Calculation and Display of Tokens per second #6096: Adding Experimental Calculation and Display of Tokens per second

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

  4. github-actions
    added
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Mar 24, 2026
  5. andrewdunndev commented on Mar 24, 2026

    @andrewdunndev
    andrewdunndev
    on Mar 24, 2026
    Author
    More actions

    Closing as duplicate of #17449 (real-time token display in footer) and #13003 (token usage in TUI). I'll comment on those with an implementation offer.

  6. andrewdunndev
    closed this as completedon Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

Labels

needs:complianceThis means the issue will auto-close after 2 hours.opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.