Agents git committing when they shouldn't

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In a recent update, agents in cursor seem to have stopped correctly obeying the command allowlist. My specific issue is that agents suddenly started using git commit even though I specifically never added that to the allowlist so that I could review commits and prevent pollution of the git commit history. I have allowed various git commands, e.g. git diff, git add but not git commit.

Steps to Reproduce

Instruct model to commit changes - should stage files, generate a commit message, and prompt for approval to run commit command (NOT commit without approval)

Expected Behavior

Models git committing changes automatically instead of generating command and awaiting approval

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.54
VSCode Version: 1.99.3
Commit: 5c17eb2968a37f66bc6662f48d6356a100b67be0
Date: 2025-10-21T19:07:38.476Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

All models I’ve tried (haiku, sonnet, codex…)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This is a known issue with the newly added “Auto-run in Sandbox” feature, it bypasses the Command Allowlist for some commands like git commit.

Workaround: enable the “Legacy Terminal Tool” option:

  • Open Settings → Chat → Auto Run
  • Enable “Legacy Terminal Tool”
  • The sandbox options will disappear, and your allowlist will work as expected

I’ll try that, thanks!