[MODEL] Claude code starts git find command to scan entire user folder
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude accessed files outside the working directory
What You Asked Claude to Do
Requested a plan to generate a unit test project.
What Claude Actually Did
It worked on the plan, but that's not the issue. It's what it did while working on the plan that's the problem.
It issued a git find command on the root of my user folder to search for CLAUD.md. The logged command was:
"command":"find /c/Users/<<user>> -name \"CLAUDE.md\" -type f 2>/dev/null | head -5"
This is:
- Not efficient, my user folder folder could be huge.
- A little invasive
- It triggered Microsoft onedrive to start down loading all the files linked to onedrive, because the onedrive folder is under the user folder and when "find" scanned the onedrive folder the links trigger onedrive to down load the content so that "find" could check it. Very in efficient and stupid (there could be gigabytes on onedrive)
To scan everything thing under /c/Users/<<user>> is ridiculous. Why would a CLAUD.md file in some completely un related folder be useful? Its reckless, inefficient and can have un foreseen repercussions such as downloading huge amount of files in a onedrive folder.
Expected Behavior
Claude should have searched relevant folders for desired files. As documented, if not instructed otherwise it should search:
- ~/.cloude
- Current repo / project folder
- Current repo / project folder parents up to ~/
Files Affected
Permission Mode
I don't know / Not sure
Can You Reproduce This?
Haven't tried to reproduce
Steps to Reproduce
_No response_
Claude Model
Opus
Relevant Conversation
Model version 4.7
Impact
High - Significant unwanted changes
Claude Code Version
1.3109.0
Platform
Anthropic API
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗