Agent Review sometimes fails with ‘Failed to gather context’ error

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:

  1. The complete error message from the Output panel (the part after the colon)
  2. Your current git branch and whether you have a main branch (or master) both locally and on the remote
  3. 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