Skip to content

[FEATURE]: Session context usage (similar to /context in Claude) #6152

@mtymek

Description

@mtymek

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

I would like to implement a simple tool - TUI dialog - that displays a breakdown of the current session's context window usage, answering the question "what is eating my context window". A feature similar to /context command in Claude Code.

It could be used by:
a) developers to optimize how many MCPs, plugins and tools they have installed
b) MCP, plugin and tool authors to improve the quality of their work

I build a quick PoC, and while the real token usage is difficult to get, the estimations seem good enough to be useful.

Would you be interested in having such feature in the core, or should I try to build it as a plugin?

Here's the PoC implement as a dialog:
Image

Alternatively, it could be placed in the sidebar:
Image

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionopentuiThis 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