Skip to content

Feature request: Show context window utilization percentage in the TUI status bar #33745

Closed as not planned

Description

@umsiddiqui

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem / Motivation
When working in long OpenCode TUI sessions, it is hard to tell how much of the model's context window is already consumed. Knowing the utilization percentage at a glance would help users:

  • Decide when to run /compact before hitting the limit.
  • Understand why a model might start losing earlier context.
  • Avoid unexpected truncation or compaction behavior during complex tasks.
    Proposed Solution
    Add a small, optional status indicator to the TUI (e.g., in the footer/status bar or near the input prompt) that displays the current context window utilization as a percentage, such as:
    Context: 67%
    Ideally it could include:
  • Percentage of the active model's context window currently used.
  • Optional color coding (green/yellow/red) as usage approaches the limit.
  • A way to toggle it on/off via the command palette (ctrl+p) or tui.json.
    Example tui.json option:
    {
    "$schema": "https://opencode.ai/tui.json",
    "status_bar": {
    "context_utilization": true
    }
    }
    Alternatives Considered
  • Running /compact manually when things feel slow — but this is reactive and does not show current usage.
  • Checking the debug panel — but it is not a persistent, at-a-glance indicator.
    Additional Context
    OpenCode already manages context via compaction settings in opencode.json. Exposing the live utilization percentage in the UI would complement that feature nicely and improve transparency for users.

Activity

  1. github-actions commented on Jun 25, 2026

    @github-actions
    Contributor

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

    Please review these issues and consider adding a "+1" or additional context there instead of opening a new request.

  2. github-actions commented on Aug 24, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions