Sometimes I’m unable to use the Agent Review feature in Cursor. When I click “Find Issues” in the Source Control panel, the Output panel shows the following error:
2025-11-28 11:08:49.441 [info] Computing local context for repository at 'xxx'
2025-11-28 11:08:49.490 [error] Error computing local context: Error: Failed to gather Agent Review context.
Caused by:
Error when executing 'git':
The error message ends with a colon but shows no further details after it.
The Review Changes function inside the Agent chat still works, but only for the changes that Agent made this time. Reviewing the changes for the current diff from main branch of the repository triggers this error.
This issue only happens in some of my Git repositories, and I’m not sure what specific condition is causing it.
Steps to Reproduce
Click Find Issues from Source Control panel, or Open Agent's Changes, then Find Issues with Review Diff with Main Branch option.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report! I found a very similar issue from another user where the complete error shows: Error when executing 'git': fatal: Not a valid object name origin
This seems to be related to git branch references in the Agent Review feature. To help investigate, could you please share:
The complete error message from the Output panel (the part after the colon)
Your current git branch and whether you have a main branch (or master) both locally and on the remote
Run git branch -a in your terminal and share the output
Workaround: As you noted, the “Review Changes” function inside Agent chat should work for reviewing Agent’s own changes.
This looks like it may need engineering attention. I’ve linked your report with a similar one here: Agent review GIT issue
As I mentioned in my original report, there is actually no output after the colon. If I click “Find Issues” multiple times in a row, the logs look like this:
2025-11-28 14:12:45.969 [info] Computing local context for repository at 'xxx'
2025-11-28 14:12:46.002 [error] Error computing local context: Error: Failed to gather Agent Review context.
Caused by:
Error when executing 'git':
2025-11-28 14:12:46.744 [info] Computing local context for repository at 'xxx'
2025-11-28 14:12:46.812 [error] Error computing local context: Error: Failed to gather Agent Review context.
Caused by:
Error when executing 'git':
2025-11-28 14:12:47.033 [info] Computing local context for repository at 'xxx'
2025-11-28 14:12:47.072 [error] Error computing local context: Error: Failed to gather Agent Review context.
Caused by:
Error when executing 'git':
So this might be slightly different from the similar issue you referenced, since the error message ends with a colon and never shows any additional output.
Thanks for the detailed info! This is helpful. The empty error message after the colon suggests the git command itself is failing silently, which is different from the typical output.
Given your git setup with both origin/main and origin/master branches, this might be confusing Agent Review’s branch detection logic.
I’ve escalated this to the engineering team along with the similar report. The Agent Review feature is quite new and still being refined, so bugs like this are being actively addressed.
In the meantime, the “Review Changes” function inside Agent chat should continue to work for reviewing Agent’s generated changes. Your other Cursor features should work normally.