Agent Review is broken when git repo is workspace subdirectory

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Agent review doesn’t work when the workspace root is not a git repo. I use the following project layout:

workspace-root/
  -- src/   <-- the main git repo
  -- build/  <-- the build directory
  -- .cursor
  -- [other local files]

When I switch to the Source Control view in the primary side bar, I can see my git repo being picked up in ‘Changes’, but ‘Agent Review’ fails with:

Failed to gather Agent Review context. Caused by: Error when executing 'git': fatal: not a git repository (or any parent up to mount point /home/jakub) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Steps to Reproduce

mkdir test-workspace
cd test-workspace
git clone <any-repo>
cd <any-repo>
touch test.txt
git add test.txt
git commit -m "Test"

In Cursor: FileOpen Folder → select test-workspace.
Navigate to Source Control, start Agent Review

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.4.21
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: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey there!

Thanks for reporting this. I can reproduce this just as you outlined (thanks for the great repro steps).

In the meantime, opening the Git repository as the root instead of the parent directory should let you run the Agent Review.

1 Like

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