[BUG] Violation of claude.md with regards to git commands
Resolved 💬 2 comments Opened Jun 21, 2026 by eirirlar Closed Jun 25, 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?
I have the following in claude.md:
Never run any git command.
Despite this, claude code tried to run this:
● Bash(gh issue view 17033 --repo FreeCAD/FreeCAD --comments)
⎿ Error: Exit code 127
/usr/bin/bash: line 1: gh: command not found
What Should Happen?
Claude should not run any commands that interacts with git. Including github commands.
Error Messages/Logs
Steps to Reproduce
See description
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.150
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
terminal git bash
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗