Extension Host terminates unexpectedly with STATUS_STACK_BUFFER_OVERRUN when opening a large git repository with crepectl enabled

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When opening a specific git repository, the Extension Host terminates unexpectedly with error code -1073740791 (0xC0000409, STATUS_STACK_BUFFER_OVERRUN). The crash occurs approximately 400-500ms after the anysphere.cursor-retrieval extension is activated.
Through investigation, I identified that the crash is caused by crepectl.exe (located at resources/app/resources/helpers/crepectl.exe). Renaming this binary to disable it resolves the crash.
The crash only occurs with this specific repository. Opening a non-git folder or a smaller/simpler git repository works fine.

Repository characteristics:

  • 3,475 tracked files
  • 317 branches (local + remote)
  • 49 pack files, ~145 MiB total size
  • No submodules
  • Non-standard remote name (xxbase instead of origin, though I later added origin and the issue persisted)

Steps to Reproduce

  1. Open Cursor with the affected git repository
  2. Ensure anysphere.cursor-retrieval extension is enabled
  3. Extension Host terminates unexpectedly within ~500ms after startup
  4. Cursor automatically restarts Extension Host, which crashes again repeatedly
    Diagnostic steps I performed:
  5. Disabled all user-installed extensions → still crashes
  6. Opened a non-git folder → works fine
  7. Opened a different smaller git repository → works fine
  8. Renamed crepectl.exe → works fine (confirms crepectl.exe is the cause)

Expected Behavior

Extension Host should start successfully without crashing, regardless of repository size or branch count.

Operating System

Windows 10/11

Version Information

Version: 2.5.25 (user setup)
VSCode Version: 1.105.1
Commit: 7150844152b426ed50d2b68dd6b33b5c5beb73c0
Date: 2026-02-24T07:17:49.417Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19045

Additional Information

Crash log excerpt (from main.log):

[error] [UtilityProcess id: 1, type: extensionHost, pid: 15140]: crashed with code -1073740791 and reason 'crashed'

Grep Service log (from Cursor Grep Service.log):

[info] using external crepectl binary at 'd:\Cursor\cursor\resources\app\resources\helpers\crepectl.exe'
[info] initialized head tracking (current branch = 'version/xx/1.0.9-xx', current commit = 44e18ee2...)
[info] bootstrapping repository index at 'd:\Projects\LFlow_qwj' (cache_path=d:\Projects\LFlow_qwj\.git\cursor/crepe)
[info] looking for best possible index (current_sha=44e18ee2...)
[info] candidate index ... is 1126 commits away
[info] loading index for commit b7413ae2...

(Extension Host crashed immediately after this)

Workaround:
Rename or delete crepectl.exe to prevent the crash. This disables local code indexing but allows Cursor to function normally otherwise.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report and for debugging this.

This is clearly a bug in crepectl. It looks like a stack overflow happens while bootstrapping the index when processing a repo with that many branches and pack files. The fact that renaming the binary fixes it confirms it’s on our side.

I’ve already shared this with the team. For now, your workaround (renaming crepectl.exe) is the right call. You’ll lose local codebase indexing, but everything else should work as usual.

There’s also another option. You can disable codebase indexing in Cursor Settings > Indexing & Docs > Codebase Indexing by turning the toggle off. That way you won’t need to rename the binary, and the fix will survive updates.

I’ll post here if there’s any news about a fix. If you have more details about the repo structure that could help us reproduce it (like an approximate commit count, or anything unusual in the git history), please share them.

Thank you for the response.

In this repo I see 2686 commits.

$git rev-list --count HEAD
2686

BTW, there are 7400+ untracked files, most of them are resource files like jpg, xml, etc, while it’s 1000 files in Codebase Indexing.

As you mentioned, I found the “Index Repositories for Instant Grep“ switch, which has a BETA flag but automatically be on, so I turned it off, and restored the crepectl.exe. After restart, the Cursor IDE works normal as expected.

Hope this msg can help ppl who having the same problem.

Glad it helped. The extra details about 2,686 commits and 7,400+ untracked files are useful info, I shared them with the team. This should help us reproduce the issue.

I see the screenshot with the “Index Repositories for Instant Grep” setting, yes, that’s the right toggle.

Let me know if anything else comes up.