You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a /context slash command (inspired by Claude Code's /context) exposing a detailed breakdown of how the context window is being used: prompt, tools, and message history split by token counts, plus estimated cost.
Why
Today the sidebar (packages/tui/src/feature-plugins/sidebar/context.tsx) only shows the aggregate token count and cost for the latest assistant message (last.tokens.input + output + reasoning + cache.read + cache.write, plus money.format(cost())). There is no per-component visibility, so users can't tell whether prompt/system instructions, tools, or history is consuming the window.
Proposed behavior
/context opens a dialog/sidebar breakdown: system prompt, tool definitions, session messages, and cached tokens each as a separate row with token counts and percentages of the model's context limit.
Optionally surface estimated cost per component.
Reuse the model context-limit metadata already read in context.tsx.
Benefits
Diagnose context overflow before /compact is needed.
Activity
github-actions commentedon Aug 12, 2026
This issue might be a duplicate of existing issues. Please check:
/context), showing per-component token usage. It even includes a PoC implementation and has 22 comments.github-actions commentedon Oct 11, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.