# Linux sandbox Step 4/7 (mount denies): ENOENT on nested .vscode under a .cursorignore’d parent

**URL:** <https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373>\
**Category:** Bug Reports\
**Tags:** terminal, sandbox, linux\
**Created:** [September 19, 2026, 9:23pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373 "2026-09-19T21:23:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francois\_GIRAULT](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@Francois\_GIRAULT](https://forum.cursor.com/u/Francois_GIRAULT)\
**Post date:** [September 19, 2026, 9:23pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/1 "2026-09-19T21:23:11Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

On Linux, the Agent Shell sandbox fails at preflight whenever a protected `.vscode` directory sits under a parent ignored by `.cursorignore` (here: `priv/`).

The `.vscode` folder exists on the host (normal directory, e.g. with `tasks.json`). The sandbox still reports ENOENT and **aborts setup** , so **every** sandboxed command fails — including `echo`, `true`, or `gcc`. This is not an AppArmor / user-namespace failure: the sandbox starts, then dies at step 4/7 (`mount denies`).

Typical error:

Failed to apply sandbox: IO error: Step 4/7 (mount denies) failed:  
IO error: Failed to mount “/…/priv/someProject/.vscode” read-only:  
IO error: No such file or directory (os error 2)

Cause: `.cursorignore` removes `priv/` from the sandbox namespace (ignore mapping), then a hardcoded deny-mount of `.vscode/**` looks up a path that is no longer there.

Removing `.vscode/` from `.cursorignore` while keeping `priv/` does not fix it. Listing those `.vscode` paths in `.cursor/sandbox.json` `additionalReadonlyPaths` does not fix it either. Opening the repo via a symlink vs the real path only changes the path in the error.

Workaround: temporarily move the agent workspace root to a subdirectory that does not contain those nested `.vscode` trees; sandbox then starts. Restoring the repo root brings the failure back. Deleting author `.vscode` folders or un-ignoring `priv/` is not acceptable (private/solution trees would flood agent context).

Related but not the same: WSL2 `.git/hooks` deny-mount ENOENT; missing `additionalReadwritePaths` aborting init.

### Steps to Reproduce

1. Use a git-backed folder as the Cursor workspace root.
2. Add a directory pattern to `.cursorignore`, e.g. `priv/`.
3. Create a real nested project dir that Cursor also treats as a protected path:  
`<repo>/…/priv/someProject/.vscode/tasks.json`  
(the `.vscode` directory must exist on disk).
4. Keep Agent sandbox enabled (Auto-review or Allowlist with Sandbox).
5. In Agent chat, ask the agent to run any shell command, e.g. `echo ok` or `gcc --version`.

### Expected Behavior

If a hardcoded protected deny-mount (`.vscode/**`, etc.) is missing or unreachable after `.cursorignore` mapping, skip that mount and continue. The sandbox should start; ignored `priv/` should hide files from the agent without blocking `gcc` (and other commands) in the rest of the repo.

Actual: sandbox init aborts; the agent cannot run any sandboxed command and must request unsandboxed `all`.

### Operating System

Linux

### Version Information

Cursor IDE 3.16.17 (commit 6b2afae0257df2bb5e1835f15165dc2f0de056b0), x64  
Where it appears: Cursor IDE — Agent Shell / terminal sandbox (not the user integrated terminal; CLI not tested)

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [September 20, 2026, 9:00am UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/5 "2026-09-20T09:00:13Z")

</div>

Hey, thanks for the detailed report. Your breakdown of what’s happening is correct.

Sandbox first hides folders from `.cursorignore`, in this case `priv/`, and then in a separate pass it tries to protect every `.vscode` it finds. When `.vscode` is inside a parent that’s already hidden, the second step can’t find the path and crashes instead of just skipping it. This is a known issue on our side that we’re tracking, and I’ve added your report to it. Also worth calling out that you’re on plain Linux, not WSL2, which is helpful.

Until we have a fix, the least painful workaround if you want to keep `priv/` ignored is to run the agent’s shell commands without sandbox for this workspace:

1. Cursor Settings \> Agents \> Approvals & Execution.
2. Pick a run mode with no sandbox for shell commands, either Run Everything or Allowlist with sandboxing turned off.

Sandbox is a security layer, so only do this in repos you trust. Your approach of moving the workspace root into a subdirectory also works if you want to keep sandbox enabled. More on run modes: [Run Modes | Cursor Docs](https://cursor.com/docs/agent/security/run-modes)

I can’t share an ETA yet, but I’ll post in the thread once there’s an update.

---

<div class="post-metadata">

**Author:** ![Richard\_Scott](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Scott](https://forum.cursor.com/u/Richard_Scott)\
**Post date:** [October 16, 2026, 2:50pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/7 "2026-10-16T14:50:40Z")

</div>

I’m encountering a very similar Step 4/7 sandbox failure on **Cursor 3.24.18** , running on an NVIDIA Jetson Orin Nano (native Linux ARM64, Ubuntu 24.04 / JetPack 7.2).

The Agent terminal fails during sandbox initialization with:

`Step 4/7 (mount denies) failed: Failed to mount [existing workspace path] read-only: No such file or directory (os error 2)`

The failing paths have varied between an existing `.vscode` directory, a `.code-workspace` file, and a `.cursorignore` file. All were verified to exist and be readable.

My `.cursorignore` contains only `build/`, `install/`, `log/`, `*.bag`, and `*.db3`. None appear to exclude the failing paths.

The failure persists after restarting Cursor, rebooting, and testing single-root and multi-root workspaces.

I also tried **Run Everything (Unsandboxed)**, but sandbox initialization was still attempted.

Is this potentially the same known issue, or does the absence of an ignored parent suggest a separate bug? Has a fix been included in any release after 3.16.17?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 16, 2026, 3:15pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/8 "2026-10-16T15:15:33Z")

</div>

Hey @Richard_Scott, thanks for the details.

Your case looks similar to the original one, but it’s still a bit different. In your case, the top-level paths are failing (`.vscode`, `.code-workspace`, `.cursorignore`), and there isn’t an ignored parent above them. The root cause might be the same, but I can’t confirm that yet. The issue from the original post is still being tracked, and I can’t say it was fixed in any release after 3.16.17.

To avoid mixing the two scenarios, could you please create a separate thread in Bug Reports and add:

1. The full path to the workspace, plus the output of `readlink -f <workspace>` and `findmnt -T <workspace>`. I want to check whether the project is on a separate mount, like an external NVMe, and whether there’s a symlink in the path.
2. Whether you have `~/.cursor/sandbox.json` or `.cursor/sandbox.json` in the project, and if you do, what’s in them.
3. About Run Everything, please say whether you tested it in a new chat after changing the mode, and attach a screenshot of Settings \> Agents \> Approvals & Execution along with the error text. Also let me know whether you’re on Team or Enterprise, where the mode may be set by an admin.

Per the docs, Run Everything doesn’t use sandbox for shell commands: [Run Modes | Cursor Docs](https://cursor.com/docs/agent/security/run-modes)

So if `init` still runs in a new chat, that’s worth digging into too.

Please send the link to the new thread here once you’ve created it.

---

<div class="post-metadata">

**Author:** ![Richard\_Scott](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Scott](https://forum.cursor.com/u/Richard_Scott)\
**Post date:** [October 16, 2026, 4:41pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/9 "2026-10-16T16:41:01Z")

</div>

**Update — Parent `.cursorignore` workaround resolves both Jetson failures**

Thanks, Dean. Your suggestion identified the problem.

I found two parent `.cursorignore` files on both my Ubuntu Dev VM and NVIDIA Jetson Orin Nano (ARM64). Both contained:

```auto
# This directory should never be in a Cursor workspace
*

```

**Dev VM (Ubuntu 24.04):**

- `/data/RHS_Projects.git_local/.cursorignore`

- `/data/RHS_Projects.git_local/Projects/.cursorignore`

After temporarily renaming both files to `.cursorignore.disabled` and restarting Cursor 3.24.18:

- Dedicated `Read` tool succeeded.

- Workspace search succeeded.

- Neither tool reported an ignore-filtering or permission error.

**Jetson (Ubuntu 24.04, ARM64):**

- `/home/rhscott/GitRepos/RHS_Projects.git_local/.cursorignore`

- `/home/rhscott/GitRepos/RHS_Projects.git_local/Projects/.cursorignore`

After disabling both files and restarting Cursor:

- Dedicated `Read` succeeded, returning package name `rhs_robot_v1_control`.

- In a fresh Agent conversation with **Auto-Review (with Sandbox)** enabled, the terminal successfully executed:

```auto
/usr/bin/printf 'CURSOR_AGENT_SANDBOX_TEST_OK\n'

```

Output: `CURSOR_AGENT_SANDBOX_TEST_OK`

Exit code: `0`

No sandbox initialization error occurred.

**Correction regarding Run Everything (Unsandboxed):**

I also retested this mode on the Jetson in a fresh Agent conversation **before disabling the parent ignore files**. The Agent terminal executed successfully with exit code `0` and no sandbox initialization error. My earlier report that Run Everything also failed was incorrect.

**Conclusion:**

The parent `.cursorignore` wildcard rules caused the dedicated file-reading failures on both Linux machines. Disabling those rules also eliminated the Jetson Step 4/7 sandbox initialization failure in the latest test.

The precise relationship between inherited ignore rules and the sandbox mount failure remains unconfirmed, but both problems are currently resolved using this workaround.

I have retained the original files as `.cursorignore.disabled` for now.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 19, 2026, 5:32pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/10 "2026-10-19T17:32:24Z")

</div>

Hey @Richard_Scott, thanks for seeing the investigation through and following up here.

I need to correct my previous reply. I said there was no ignored parent above those paths. In fact, there was one, just above the workspace root. It looks like `*` in a parent `.cursorignore` caused the sandbox to hide the entire workspace. After that, the protected top-level paths `.vscode`, `.code-workspace`, and `.cursorignore` could no longer be found, and everything failed at Step 4/7. This is the same pattern as in the first post, except the hidden parent is above the project rather than inside it.

For now, it’s better to keep those files renamed. If they are needed so upper folders do not open as a workspace, you can narrow the pattern so it does not catch nested projects. I shared the file-reading details with the team in your thread here: [Cursor 3.24.18 Linux: Agent file reader Permission denied; incorrect .cursorignore filtering](https://forum.cursor.com/t/cursor-3-24-18-linux-agent-file-reader-permission-denied-incorrect-cursorignore-filtering/175043)

@Francois_GIRAULT, for your case with `.vscode` inside `priv/`, there are no updates yet. The workaround from my reply above is still the current one. I’ll post here when anything changes.

---

<div class="post-metadata">

**Author:** ![Francois\_GIRAULT](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@Francois\_GIRAULT](https://forum.cursor.com/u/Francois_GIRAULT)\
**Post date:** [October 19, 2026, 5:46pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/11 "2026-10-19T17:46:39Z")

</div>

Thanks for your kind attention.  
Best regards,  
F. Girault.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 26, 2026, 6:09pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/13 "2026-10-26T18:09:28Z")

</div>

Hey @Francois_GIRAULT, as promised, I’m following up.

The change that fixes the sandbox crash at `Step 4/7 (mount denies)` when `.vscode` is inside a folder hidden via `.cursorignore` is already ready. It’ll be included in one of the next Cursor versions, but I can’t give the exact version number yet. After that, the sandbox will no longer try to mount anything inside a folder that’s already hidden, so you’ll be able to keep `priv/` in `.cursorignore` and still work with sandbox enabled.

Until the new version reaches you, the workaround from my earlier reply in the thread should still work. After you update, please try again and let me know if the issue still happens.

---

<div class="post-metadata">

**Author:** ![Francois\_GIRAULT](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@Francois\_GIRAULT](https://forum.cursor.com/u/Francois_GIRAULT)\
**Post date:** [October 26, 2026, 6:23pm UTC](https://forum.cursor.com/t/linux-sandbox-step-4-7-mount-denies-enoent-on-nested-vscode-under-a-cursorignore-d-parent/172373/14 "2026-10-26T18:23:07Z")

</div>

Hello, Dean.

Thanks for telling me. Once everything is ready, I will test, come back to you and report.

Have a nice day,  
FG
