[BUG] /context executes /compact instead, unless I ask nicely :-)

Status Fixed / completed
Maintainer reply ✓ Yes — bogini
Activity 11 comments · opened Oct 31, 2025 · closed Nov 3, 2025
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

That first /compact was NOT typed in. I typed /context

/context runs /compact instead

/context please will run /context

<img width="1140" height="212" alt="Image" src="https://github.com/user-attachments/assets/1a6bf9af-e9de-44da-90d6-c29a397e9c7a" />

What Should Happen?

/context should execute the slash command context and not compact

Error Messages/Logs

Steps to Reproduce

Fill context up w/o auto-compact turned off. type

/context

Claude will execute a compact

<img width="1003" height="204" alt="Image" src="https://github.com/user-attachments/assets/439b7145-807a-45d0-840c-dcf3b37eb1b8" />

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.30 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Thank you!

View original on GitHub ↗

11 Comments

tacass · 10 months ago

This is bad because your context gets mangled just at the moment when you are trying to be strategic about managing your context, such as considering to embark on a complex code change you've just lined up.

GoluxHat · 10 months ago

I am experiencing the same bug (for the first time just now).

Thanks OP for the workaround.

But please prioritize this bug, it's quite a dangerous one!

HatmanStack · 10 months ago

Also seeing this

jbmia9745 · 10 months ago

Same bug here with Opus.. frustrating.

kylesnowschwartz · 10 months ago

This is a bug with the command picker - it highlights a command that is not what you've typed into the prompt box. I've closed my issue to thumbs up this one.

AstroMined · 10 months ago

I've found that it will also respond correctly if you use the arrow keys to properly select /context.
Either way, it's definitely undesirable.

Without arrow keys:

!Image

With arrow keys:

!Image

jenova-marie · 10 months ago

Yes, you've identified the actual source of the issue. I've only ever had this happen with context/compact but it also just started happening with /mcp and /git-commit (a custom command). /mcp runs /git-commit now. Thank you for pointing out it's a picker issue!

arcaputo3 · 10 months ago

+1

jenova-marie · 10 months ago
This is bad because your context gets mangled just at the moment when you are trying to be strategic about managing your context, such as considering to embark on a complex code change you've just lined up.

Yes, this is bad, but if you stop the compact via esc, before it finishes the context remains intact.

bogini collaborator · 10 months ago

This has been fixed in 2.0.32.

github-actions[bot] · 9 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.