[BUG] Claude Code (Opus 4.8) repeatedly fails to use MacOS grep correctly, losing a lot of time
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?
Claude Code repeatedly fails to understand correct usage of grep on macOS. This has led to several cases of incorrect operation, lost time, and erroneous reporting. Here is an example of the latest:
"My reclaim-skip guard has a BSD-grep bug — the \|/\? BRE syntax doesn't work on macOS grep, so the image check never matched, the reclaim ran anyway, busted the cache, and forced the slow networked rebuild. That's why e2e5 is rebuilding instead of cache-hitting."
What Should Happen?
Claude should be trained on correct usage of tools on macOS and not be confused by generic Linux training.
Error Messages/Logs
Claude's output:
"My reclaim-skip guard has a BSD-grep bug — the \|/\? BRE syntax doesn't work on macOS grep, so the image check never matched, the reclaim ran anyway, busted the cache, and forced the slow networked rebuild. That's why e2e5 is rebuilding instead of cache-hitting."
Steps to Reproduce
Unknown - Claude seems to repeatedly confuse grep syntax between Linux and macOS.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.201 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗