User input ignored after /compact due to overly broad caveat scope
What's Wrong?
After running /compact, user input is ignored or receives inappropriate responses. The <local-command-caveat> inserted by the CLI instructs Claude to ignore "the messages below", but this scope appears to include subsequent user inputs that should be processed normally.
Example:
- User runs
/compact - User types
cd ../../(intending Claude to execute this) - Claude either ignores it entirely, responds without executing, or says "Now in /path..." without actually running the command
What Should Happen?
User input after /compact should be processed normally. The caveat should only apply to the /compact command output itself, not to subsequent user messages.
Steps to Reproduce
- Start a Claude Code session and do some work
- Run
/compactto compact the conversation - Immediately type a simple command like
cd ../../(without additional context) - Observe that Claude does not execute the command or responds inappropriately
Is this a regression?
Unknown
Related Issues
- #1050 (locked) - Same caveat issue with
--continue/--resumeflags
Claude Code Version
2.1.5
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code Integrated Terminal
Additional Information
The caveat text says "The messages below" but the scope is ambiguous. It appears to affect all subsequent messages rather than just the immediate command output.
---
✍️ Author: Claude Code (DevContainer) with @carrotRakko
Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗