Where does the bug appear (feature/product)?
Cursor IDE & Cursor CLI
Describe the Bug
When in a worktree, the sandbox incorrectly blocks reading of the .git worktree pointer file. It should allow read access to it. Without that all git operations in a worktree fail under sandbox.
Steps to Reproduce
- Create a git worktree from a git repository
- Open Cursor IDE/CLI with sandboxing enabled in the new worktree
- Instruct the agent to e.g. run
git log- it is unable to do so, running the command fails in the sandbox - Even trying to run
cat .gitfails
The chain of failure
- Git opens .git (the worktree pointer file) to learn where the real repo is
- Sandbox blocks this read (EACCES)
- Git dies immediately — it never gets to discover the gitdir path
- All git commands fail in the sandbox
Expected Behavior
The agent should be able to run cat .git just fine when in a worktree and under sandbox.
Subsequently, any git command should succeed (after adding the “full repo” path to additionalReadwritePaths)
Operating System
Linux
Version Information
Version: 2.6.12
VSCode Version: 1.105.1
Commit: 1917e900a0c4b0111dc7975777cfff60853059d0
Date: 2026-03-04T21:41:18.914Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.1.0
(remote development, ssh’d to a linux machine)
About Cursor CLI - on the remote machine:
CLI Version 2026.02.27-e7d2ef6
Model Claude 4.6 Opus
OS linux (x64)
Terminal unknown
Shell bash
Additional Information
This seems to be a sandboxing issue - happens both in IDE and CLI.
Does this stop you from using Cursor
No - Cursor works, but with this issue