Cursor fails to use mv - sandbox issue

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor cannot move files (bash mv)

First of all, it tried to rewrite full files instead of just using mv - Not for teh first time. When I pointed it to use mv explicitely, it failed due to some “sandbox”:

Use bash mv do NOT rewrite full files

Plan: move docs using mv (no rewrites), then do small, surgical edits to homepage/README.md to remove calendar-specific fragments and replace them with a pointer to Web/site/apps/calendar/.
mkdir -p Web/site/apps/calendar/DOCS/setupGuide Web/site/apps/calendar/DOCS/API Web/site/apps/calendar/DOCS/userStories Web/site/apps/calendar/DOCS/architecture && mv -f Web/site/apps/calendar/SETUP.md Web/site/apps/calendar/SETUP.generated.md && mv -f Web/site/apps/homepage/DOCS/gmail-oauth-localhost-setup.md Web/site/apps/calendar/SETUP.md && mv -f Web/site/apps/homepage/DOCS/google-calendar-auth-service-accounts.md Web/site/apps/calendar/DOCS/setupGuide/google-calendar-auth-service-accounts.md && mv -f Web/site/apps/homepage/DOCS/google-calendar-api-freebusy-and-events.md Web/site/apps/calendar/DOCS/API/google-calendar-api-freebusy-and-events.md && mv -f Web/site/apps/homepage/DOCS/CalendarPlan/clientUserStories.md Web/site/apps/calendar/DOCS/userStories/clientUserStories.md && mv -f Web/site/apps/homepage/DOCS/CalendarPlan/adminUserStories.md Web/site/apps/calendar/DOCS/userStories/adminUserStories.md && mv -f Web/site/apps/homepage/DOCS/CalendarPlan/calendarArchitecture.md Web/site/apps/calendar/DOCS/architecture/calendarArchitecture.md && mv -f Web/site/apps/homepage/DOCS/CalendarPlan/calendarFlows.md Web/site/apps/calendar/DOCS/architecture/calendarFlows.md && mv -f Web/site/apps/homepage/DOCS/CalendarPlan/calendarDiagrams.md Web/site/apps/calendar/DOCS/architecture/calendarDiagrams.md && rmdir Web/site/apps/homepage/DOCS/CalendarPlan || true

0 [main] bash (46792) C:\Program Files\Git\bin\..\usr\bin\bash.exe: *** fatal error - CreateFileMapping S-1-5-21-3167282554-1653841611-4012498499-1001.1, Win32 error 5.  Terminating.

The move command failed due to a Windows/Git Bash sandbox permission issue (“CreateFileMapping … error 5”). I’m going to rerun the same mv sequence outside the sandbox so the file moves can complete cleanly.

Steps to Reproduce

Ask Cursor to migrate large amount of code files from one folder to another.

Expected Behavior

Cursor will just use mv instantly, with no issues. It shoudl still show accept/deny for mv command if not on allowlist.

Operating System

Windows 10/11

Version Information

Version: 2.4.21 (user setup)
VSCode Version: 1.105.1
Commit: dc8361355d709f306d5159635a677a571b277bc0
Date: 2026-01-22T16:57:59.675Z
Build Type: Stable
Release Track: Early Access
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

GPT 5.2

Additional Information

I use git bash for Windows.

Also, I never asked for any “sandbox” - this is new.

Does this stop you from using Cursor

No - Cursor works, but with this issue

I am facing similar issues.
I am using auto-run in sandbox .
I asked agent to check some files and it auto ran command in the sandbox.
But all shell command failed and it reports like this.
In the past, if the agent has no permission to run the command, it will ask me for permisson.
But now, it will show success.

$ cd /Users/willis/MEPSDK/githubrelease/github && git ls-remote --tags origin | grep -E “10.6.(1|3)”
–: eval: line 1: unexpected EOF while looking for matching `)’
–: eval: line 2: syntax error: unexpected end of file
–: dump_bash_state: command not found

Hey @DjWarmonger @Sidney_Shui thanks for the report.

These are known issues with Sandbox:

  • Windows + Git Bash: Sandbox isn’t fully compatible with the Git Bash/MSYS environment yet, which is why you’re seeing the CreateFileMapping error.
  • macOS: The dump_bash_state: command not found and unexpected EOF errors are also a known bug with the Sandbox terminal.

Workaround: For now, you can turn off “Auto-run in Sandbox” in settings (Cursor Settings > Features > Terminal > Auto-run) and use the normal mode with command confirmation.

The team is aware of both issues. I’ve added your reports, it helps with prioritization.

1 Like

I was having this same issue. And from memory, this was new issue for me as well. I say “was” because I started fiddling with settings and now the issue is gone, I can run commands in Git Bash again. I don’t know what exactly I did to fix it.

There is no “Auto-run in Sandbox” option I can see in the Cursor settings. So that suggestion added to my confusion about what’s happening.

I don’t see any “Sandbox” settings in the VS Code portion of the settings either. I did have “Auto-Run Mode” enabled when I saw this issue. Now that option is set to “Ask Every Time” and commands are working again. I’m just not 100% sure that’s the setting that makes it work because I was moving other things around as well. I’m too scared to try to figure out exactly what it was since things are working now.

Version: 2.4.21 (user setup)
VSCode Version: 1.105.1
Commit: dc8361355d709f306d5159635a677a571b277bc0
Date: 2026-01-22T16:57:59.675Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.19045

1 Like

I’ve encountered a similar problem. The agent often fails to use cargo, even though it worked fine in the previous turn. The environment variables printed by the agent are::

rustup show && which cargo
Default host: x86_64-apple-darwin
rustup home:  /var/folders/gs/5_v3733n13s6vxjqldmj8zhm0000gn/T/cursor-sandbox-cache/f243d0f211ce1a38dee7a08f13a2abe5/rustup

installed toolchains
--------------------

active toolchain
----------------
no active toolchain
/Users/xxx/.cargo/bin/cargo

cursor version:

Version: 2.4.22
VSCode Version: 1.105.1
Commit: 618c607a249dd7fd2ffc662c6531143833bebd40
Date: 2026-01-26T22:51:47.692Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin x64 24.6.0

Me too, started today - was fine previously. Agent wanted to apply some git commands as I migrate a large codebase, they all got this error 5.

I had an explicit chat with the agent about it (because… 2027) and it tried some Allowlisted commands (e.g. ls) without issue, and then a likely denied one:

$ pwd && echo "sandbox test"
      0 [main] bash (24664) C:\Program Files\Git\bin\..\usr\bin\bash.exe: *** fatal error - CreateFileMapping S-1-5-21-1110584378-483594899-2879582902-1001.1, Win32 error 5.  Terminating

Version info:

Version: 2.4.23 (system setup)
VSCode Version: 1.105.1
Commit: 379934e04d2b3290cf7aefa14560f942e4212920
Date: 2026-01-29T21:24:23.350Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

I enabled the Legacy Terminal Tool instead for now, which seems to be working fine.

The issue disappeared today.
I turned off “Auto-run in Sandbox” in settings, but I felt tired in clicking allow.
So I turned on “Auto-run in Sandbox” again and the issue disappeared.
I am not sure if it works because I restarted cursor and my mac as well.