claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

User input ignored after /compact due to overly broad caveat scope

Open carrotRakko opened this issue 10 months ago • 0 comments

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

  1. Start a Claude Code session and do some work
  2. Run /compact to compact the conversation
  3. Immediately type a simple command like cd ../../ (without additional context)
  4. 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/--resume flags

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.

carrotRakko avatar Jan 13 '26 12:01 carrotRakko