Background Agent Buggin out

I have a background agent that’s run and completed its task. However I’m having a few issues:

  • When I try to “Create Pull Request” it says “Failed to create PR: [internal] Error”
  • When I attempt to push the branch to the remote it says “Failed to authenticate to git remote:”, which is unusual because I’m already authenticated on my machine.
  • When I try to “Checkout Locally” it runs for a few seconds then throws an error that says “Failed to checkout branch: Failed to execute git”
  • When I try to “Refresh GitHub authentication” i get a error saying “[unauthenticated] Error”

Request ID: bc-116925d0-b4b2-44da-b63e-3465adbcc687

1 Like

The only way I could resolve this was with exporting a .patch file from the agent instance and bringing it over to my local instance and running git apply to my patch file.

I can confirm that this is still an issue. Any response from Cursor about this?

Not sure if this is related, but I have determined that:
(a) at least sometimes, my background agents don’t push their branch to github
(b) when I click “Checkout Locally”, cursor seems to bang its head against the wall trying to checkout locally.. this results in stalling and “frozen” UI, eventually leading to “Failed to checkout branch: Failed to execute git”

Perhaps
(a) a failure to check out a branch locally could be handled more gracefully - e.g. erroring out right away
and
(b) someone might have an idea why the agent didn’t push the branch in the first place?

Note I ran 18 parallel agents with the same prompt (accidentally!) and none of them pushed the branch to github…

vscode.git/Git.log:2025-07-23 14:44:05.392 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [787ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98
vscode.git/Git.log:2025-07-23 14:44:06.290 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [695ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98
vscode.git/Git.log:2025-07-23 14:44:07.409 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [715ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98
vscode.git/Git.log:2025-07-23 14:44:08.818 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [805ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98
vscode.git/Git.log:2025-07-23 14:44:41.594 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [31974ms]
vscode.git/Git.log:2025-07-23 14:44:43.369 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [771ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98
vscode.git/Git.log:2025-07-23 14:45:20.936 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [369178ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98
vscode.git/Git.log:2025-07-23 14:45:22.669 [info] > git fetch origin refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98:refs/remotes/origin/cursor/add-reverse-geocoding-for-site-location-2d98 [728ms]
vscode.git/Git.log:fatal: couldn't find remote ref refs/heads/cursor/add-reverse-geocoding-for-site-location-2d98

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