Skip to content

Add /context command to display session token usage #10575

Closed

Description

@bpeers01

Problem
OpenCode already tracks per-request token usage, but there’s no quick way to view it in the TUI. This makes it hard to check context headroom without leaving the session.

Proposal
Add a session-level /context command that opens a dialog showing last-request token usage, context limit, usable input budget, and cache hit ratio.

Scope
TUI only. No new tracking data; just a UI for existing usage fields.

Why this matters
Improves visibility into prompt headroom and cache usage while staying in the session flow.

Verification
I will include a short repro in the PR and before/after screenshots for the dialog.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 25, 2026
  2. github-actions commented on Jan 25, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if this doesn't address your specific case.

  3. github-actions commented on Mar 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

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