Bug: /context command executes /compact instead
Description
When running the /context slash command, the CLI incorrectly executes /compact instead of displaying the context usage visualization.
Environment
- Claude Code Version: 2.1.12
- OS: macOS (Darwin 25.2.0)
- Platform: darwin
Steps to Reproduce
- Open Claude Code CLI (version 2.1.12)
- Type
/context- autocomplete correctly shows:
/context- "Visualize current context usage as a colored grid"
- Select or press Enter on
/context - Observe that
/compactis executed instead
Expected Behavior
The /context command should display a colored grid visualization of current context usage, showing token consumption and context window utilization.
Actual Behavior
The /compact command is triggered, which compresses/summarizes the conversation history instead of showing context visualization.
Evidence
The autocomplete menu correctly displays /context with the description "Visualize current context usage as a colored grid", confirming the command exists. However, selecting it triggers the wrong command handler.
Additional Context
This appears to be a command routing/mapping bug where /context is incorrectly routed to the /compact handler despite being correctly recognized in autocomplete.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗