Background agent repo corruption

Describe the Bug

I can no longer start background agents. Instead, I get an error about repo corruption. This happened after I did a squash merge, but I don’t know if that’s responsible or not. I can still clone my repo and work with it locally. Is there some kind of global cache that the background agent uses?

Allocating resources for this agent (request id: bc-a8a38aa7-22cf-4356-abd2-26a4a85a156f)...

[Status] Checking out repository…
Error: Environment failed to start
Details:
fatal: You are attempting to fetch COMMIT_HASH_A, which is in the commit graph file but not in the object database.
This is probably due to repo corruption.
If you are attempting to repair this repo corruption by refetching the missing object, use 'git fetch --refetch' with the missing object.
fatal: could not fetch COMMIT_HASH_B from promisor remote

COMMIT_HASH_A exists in the squashed and merged branch (I did not delete the branch). COMMIT_HASH_B I cannot find anywhere.

But in any case, the master branch seems to be OK, so I’m not sure what’s going on.

Steps to Reproduce

No reproduce steps yet.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.3
VSCode Version: 1.96.2
Commit: 979ba33804ac150108481c14e0b5cb970bda3260
Date: 2025-06-15T06:35:49.230Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 23.6.0

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

It would be helpful to know simply what command the agent is trying to run here.

I found the answer-- there is a “Restart Background Agent Environment” command in Cursor. (in the ctrl+shift+p menu) That worked for me to fix whatever was broken.

3 Likes

Hi @jtpereyda thank you for the bug report and for finding the answer by yourself :slight_smile: