Cursor Agent suddenly committing things to Git on its own

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Today Cursor decided to commit something directly to git. It has never done this before, and git is not in the allowlist of commands. (And no, it did not ask for permission, it just did it).

One of the things I have liked about Cursor up to this point is that it doesn’t do things like this. It can change files, sure, but as the human developer I expect to be in charge of everything related to version control.

This sudden change of behavior is concerning and makes me leery about using Cursor. I don’t want it messing with my Github repositories in ANY way, especially if I haven’t given it access to.

Steps to Reproduce

In my prompt, I gave it details about the problem I’m having and then said "Please investigate and propose a fix for this error. "

Expected Behavior

Cursor should NOT be committing things to git unless explicitly asked, and it should NOT be able to run git commands if the command is not on the allowlist.

Screenshots / Screen Recordings

Operating System

MacOS

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.2.0

For AI issues: which model did you use?

GPT 5.3 Codex

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, this is a known issue. In Auto-Run in Sandbox mode, the Command Allowlist isn’t actually applied. The sandbox overrides it by controlling file system and network access instead of approving individual commands. The UI is misleading because it still shows the allowlist as active.

Workaround: enable Legacy Terminal Tool in Cursor Settings > Agents > Inline Editing & Terminal. With that, the allowlist should work as expected, and git commands will require confirmation.

More details in this thread: Command Allowlist is silently ignored when “Auto-Run in Sandbox” is enabled

The team is aware of the UX issue. Let me know if the workaround helps.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.