[BUG] `/security-review` command fails in git repository.
Resolved 💬 3 comments Opened Mar 7, 2026 by MattPChoy Closed Apr 4, 2026
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?
When running the security-review slash command, I get an error indicating that the bash command failed.
❯ /security-review
⎿ Error: Bash command failed for pattern "!git diff origin/HEAD...": [stderr]
fatal: ambiguous argument 'origin/HEAD...': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
What Should Happen?
No error message.
Error Messages/Logs
❯ /security-review
⎿ Error: Bash command failed for pattern "!git diff origin/HEAD...": [stderr]
fatal: ambiguous argument 'origin/HEAD...': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Steps to Reproduce
Launch claude code and run security review slash command.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.71
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗