`/context` command injects output into conversation history, burning the context it measures
Problem
/context is designed to show token usage, but its output is injected into conversation history as an assistant message. This means running /context consumes the very resource it's reporting on.
Observed behavior:
- Session start: ~14% context used (baseline overhead)
- After two
/contextcalls: ~26% context used - ~12% of a 200k context window (~24k tokens) consumed just from running the diagnostic command twice
The full MCP tool table and skill listing in /context all output is particularly large — 200+ tools each with token counts serialized into message history.
Expected behavior
/context should render client-side only (e.g., printed to terminal stdout / rendered in the UI status bar) and never be injected into the conversation history.
Same principle as git status — it reports state without modifying state.
Suggested fix
Implement /context as a local terminal command that reads session token state and renders it in the UI without entering the conversation. The output should be ephemeral — visible to the user but not serialized into the context window.
Environment
- Claude Code CLI (Mac)
- Model: claude-sonnet-4-6
- Context window: 200k tokens
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗