Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Agent approval UI works normally for file edits and most terminal commands, but specifically fails for git commit operations.
When the agent runs git add + git commit, no approval card appears (Run / Approve / Skip / Allowlist). The agent shows “Waiting for approval…” or eventually times out with “Rejected: Review cancelled or failed”.
Other agent actions work correctly and show the approval UI as expected, including:
- File edits (read / write / search_replace)
git status,git diff,git log
Manual git commit in the integrated terminal works fine. The issue only affects Agent-initiated git commit operations.
This started recently (after a Cursor update). Previously, agent git commits showed the approval dialog normally.
Workaround: I run git add and git commit manually in the integrated terminal. The agent cannot complete commits on its own.
Environment notes:
- Shell: PowerShell (integrated terminal)
- On Windows, use
git add ...; git commit -m "..."(not&&) when testing manually
This appears related to special handling of “destructive” git commands (commit / push / reset) vs normal agent approvals.
Steps to Reproduce
- Open Agent mode in Cursor IDE
- Make some code changes in a git repository
- Ask the Agent: “Registre as modificações no git” (or explicitly: git add + git commit)
- Observe: no approval card appears for the git commit step
- The Agent shows “Waiting for approval…” or appears stuck
- Eventually fails with “Rejected: Review cancelled or failed”, or the user must click Stop
For comparison:
- Ask the Agent to run
git statusorgit diff→ approval UI appears normally - Run
git commitmanually in the integrated terminal → works without issue
Expected Behavior
When the Agent requests to run git commit, an approval card should appear in the chat UI (Run / Approve / Skip / Allowlist), same as for other agent terminal commands and file edits.
The user should be able to approve or reject the commit before it executes.
Actual Behavior
No approval UI is rendered for git commit operations initiated by the Agent.
The Agent enters “Waiting for approval…” state but no Approve/Run button is visible.
The operation eventually fails with “Rejected: Review cancelled or failed”, or the user must click Stop.
Manual git commit in the terminal works; only Agent-initiated commits are affected.
Operating System
Windows 10/11
Version Information
Version: 3.8.11 (user setup)
VS Code Extension API: 1.105.1
Commit: e56ad3440df06d22ca7501e65fd518e905486ef0
Date: 2026-06-18T01:40:18.333Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26200
Additional Information
Settings (collected from local Cursor logs + config files on 2026-06-19):
- Auto-Run mode: Allowlist mode (approvalMode: “allowlist”, userConfiguredPolicyType: “insecure_none”)
- Sandbox: Disabled (isSandboxEnabled: false, isSandboxAvailable: false on Windows)
- Legacy Terminal Tool: Not detected in user settings.json (using unified Agent terminal flow)
- Smart Allowlist: Disabled (smartAllowlistEnabled: false)
- Agent layout: unifiedAgent (Cursor 3.8.11 Stable)
- UI theme: One Dark Pro (not High Contrast)
Command Allowlist behavior (from Cursor structured logs):
- Auto-approved (on allowlist): git status, git diff --stat
- Requires manual approval (NOT on allowlist): git log -5 --oneline, git commit
- git commit cannot be allowlisted in some cases (canAllowlist: false for destructive git commands)
commit.gpgsign:
- Local repo: not set (defaults to unsigned commits)
- Global ~/.gitconfig: not set
- Manual git commit in terminal works without GPG prompt
Shell / terminal:
- Default integrated terminal profile: Cmder (cmd.exe)
- Project shell: PowerShell/Cmder (Windows)
Internal log evidence (Cursor Structured Logs.log):
- Backend reaches: “Shell permissions: requesting shell approval”
- approvalReasonTypes: [“unapproved_commands”]
- UI does NOT render approval card for git commit
- Failure ends as: blockReasonType: “userRejected” (user clicks Stop after invisible wait)
- Example timestamps: 2026-06-19 10:27:15, 11:07:22, 11:50:06
Related forum threads:
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor