Skip to content

[FEATURE]: Expose context/token usage to the user (e.g. /context command or status bar indicator) #33324

Closed as duplicate

Description

@Lotusland-Kioea

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

Add a /context slash command that prints current token usage breakdown (messages, system prompt, tools, headroom remaining). Optionally a compact footer indicator like "ctx 48%" in the TUI status bar.

Currently users operate blindly — only /compact and auto-compaction exist, with no visibility into how full the context actually is.

Benefits:

  • See real-time context consumption instead of guessing
  • Debug prompt bloat from large files or tool outputs
  • Proactively /compact before auto-compaction triggers
  • Parity with Claude Code which already has /context
Real-time awareness Know consumption before hitting the wall
Easier debugging Spot which files or tool outputs bloat the prompt
Proactive compaction /compact on your own terms, not the model's
Feature parity Claude Code has /context; opencode should too

Activity

  1. github-actions commented on Jun 22, 2026

    @github-actions
    Contributor

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

  2. simonklee commented on Jun 23, 2026

    @simonklee
    Member

    reference #13003

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