[BUG] bash_tool runs in Anthropic Linux sandbox instead of local macOS environment
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 using Claude Code on macOS, bash_tool executes inside Anthropic's cloud Linux sandbox (Linux runsc, x86_64) instead of the local macOS filesystem.
The system prompt declares "macOS Claude Code environment" but bash_tool actually runs on Linux. This means ~/.claude/ is completely inaccessible, local project files cannot be read or written, and Claude cannot access its own configuration.
Additionally, the bug is self-concealing: Claude cannot report this issue through its own tools because bash_tool cannot reach the macOS app layer, no Report Issue UI exists in the app, and files saved by bash_tool (/home/claude/) are lost when the session ends.
What Should Happen?
Option A (preferred): bash_tool should execute on local macOS when running in Claude Code desktop app, giving genuine access to ~/.claude/, local projects, and native tools.
Option B (acceptable): If cloud-only execution is by design, all system prompts and documentation must clearly state this so users are not misled.
Error Messages/Logs
1. Launch Claude Code on macOS
2. Ask Claude to run: uname -a
3. Observe result is "Linux runsc" not "Darwin"
4. Ask Claude to read ~/.claude/CLAUDE.md
5. Observe: file not found (Linux sandbox cannot access macOS filesystem)
Steps to Reproduce
- Launch Claude Code on macOS
- Ask Claude to run: uname -a
- Observe result is "Linux runsc" not "Darwin"
- Ask Claude to read ~/.claude/CLAUDE.md
- Observe: file not found (Linux sandbox cannot access macOS filesystem)
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.1.7714
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
During this session, Claude attempted to self-report this bug but failed at every step:
- Saved report to /home/claude/ (Linux sandbox, lost on session end)
- No Report Issue UI exists in the app
- /bug slash command requires CLI which was removed
- Cannot send feedback programmatically from Linux sandbox
The system cannot report its own bug through its own tools. This is a compounding failure.
Workaround: Users must install Desktop Commander MCP server to access local macOS filesystem. This should not be required for basic local development functionality.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗