Bug: /context command incorrectly resolves to /compact even when typing full command
Resolved 💬 2 comments Opened Jan 17, 2026 by rubrical-worker Closed Jan 17, 2026
Description
When typing /cont, the CLI defaults to /compact instead of /context. This prefix-matching behavior is understandable. However, even when typing the full /context command, it still resolves to /compact.
Steps to Reproduce
- Open Claude Code CLI
- Type
/context(the full command) - Press Enter
Expected Behavior
Typing /context (the full command name) should execute the context command.
Actual Behavior
/context resolves to /compact instead.
Environment
- Claude Code CLI
- Windows (also likely affects other platforms)
Additional Context
The command prefix resolution appears to prioritize /compact over /context alphabetically or by registration order, but typing the complete command name should bypass prefix matching and execute the exact match.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗