Cursor agent --print unable to use git

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

cursor agent --print reported that it could not use git.

This seems to contradict the help output:

-p, --print                  Print responses to console (for scripts or non-interactive use). Has access to all tools, including write and bash.

Steps to Reproduce

I tried cursor agent --print "some prompt asking it to use git" and got

Git commands are being rejected, so I can't access branches or commit history.
...

I also tried (although not believing that MCP was involved) cursor agent --approve-mcps --print and got

Terminal commands are blocked. Created a script to...

I then switched to claude code claude --allowedTools=Bash --dangerously-skip-permissions --print and it worked first time.

Expected Behavior

cursor agent --print should be able to use git

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77 (Universal)
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Not sure, default for cursor agent --print

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. It does look like there’s a mismatch between the documented behavior and how the --print mode actually works.

I’ll pass this to the team so they can investigate why git/bash tools are being blocked in print mode.

Not only git, but also in non-interactive situations, mcp cannot be used if confirmation commands are needed. It must be interactive to execute

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