Bug: /context command executes /compact instead

Resolved 💬 3 comments Opened Jan 18, 2026 by web24365 Closed Jan 22, 2026

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

  1. Open Claude Code CLI (version 2.1.12)
  2. Type /context - autocomplete correctly shows:
  • /context - "Visualize current context usage as a colored grid"
  1. Select or press Enter on /context
  2. Observe that /compact is 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗