[BUG] Explore agent triggers unscoped file access, causing OneDrive to download cloud-only files
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?
During a Claude Code session, I asked Claude to implement changes to files in a specific repository. Claude spawned multiple Explore agents to search for code patterns and trace dependencies. These agents
appear to have accessed files outside the scoped repository directory, which triggered OneDrive to download cloud-only (placeholder) files such as pictures and documents that had nothing to do with my
project.
What Should Happen?
Explore agents (and all tools) should be strictly scoped to the working directory / repository. File access should never reach outside the project folder.
Error Messages/Logs
OneDrive started downloading files (pictures, etc.) that are stored as cloud-only placeholders, indicating that file system access occurred outside the repository. This is both a privacy concern and caused
unwanted bandwidth/storage usage.
Steps to Reproduce
Steps to reproduce:
- Open Claude Code in a repository on a Windows machine with OneDrive (files on-demand enabled)
- Ask Claude to perform a task that requires tracing dependencies across multiple files
- Claude spawns Explore agents to search for code patterns
- Observe that OneDrive starts downloading cloud-only placeholder files (pictures, documents, etc.) that are unrelated to the repository
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code v2.1.77
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Environment
- Windows 11 Pro
- OneDrive for Business (files on-demand / cloud-only enabled)
- Claude Code CLI
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗