Incident Report: Cursor Extension Host Crashes & Source Control Disconnections¶
Date: 2026-03-17 Severity: LOW (stability issue, no security impact) Affected system: Local development machine (macOS) IDE: Cursor Status: Resolved (updated after recurrence)
Executive Summary¶
The Cursor Source Control pane was intermittently losing connection to the git repository -- going blank for several seconds before re-scanning and returning to normal. Investigation revealed the Cursor Extension Host process was crashing and auto-restarting, taking the built-in git extension down with it. The crashes were caused by a combination of memory pressure from too many extensions, an orphaned MCP server registration, and a failing Nx Console MCP server flooding the logs with reconnection errors.
A security audit of the local machine was also performed (prompted by a concurrent crypto miner incident on the CI build agent). No indicators of compromise were found.
Symptoms¶
- Source Control pane in Cursor would go blank ("no repository") for 3-5 seconds
- After a brief pause, Cursor would re-scan the workspace and Source Control would return
- This happened repeatedly throughout development sessions
- The IDE status bar showed "The extension host terminated unexpectedly. Restarting..."
Root Cause Analysis¶
Extension Host Crash¶
The Cursor renderer log captured the crash at 09:47:40 UTC:
Extension host (LocalProcess [role: user] pid: 10042) terminated unexpectedly.
Automatically restarting the extension host.
The crash killed all 31 running extensions simultaneously, including vscode.git and vscode.git-base, which caused the Source Control pane to lose its repository connection until the Extension Host restarted and the git extension re-activated (~424ms to activate, plus repository scan time).
Contributing Factors¶
1. Nx Console MCP Server (port 9639)
The Nx Console extension starts an MCP HTTP server on port 9639. When the Extension Host crashed, this server died. On restart, Cursor's MCP infrastructure attempted to reconnect before Nx Console had re-initialized, creating a cascade of errors:
Client error for command fetch failed
Error connecting to streamableHttp server, falling back to SSE: fetch failed
Client error for command SSE error: TypeError: fetch failed:
connect ECONNREFUSED 127.0.0.1:9639, connect ECONNREFUSED ::1:9639
Each reconnection attempt generated multiple log entries, contributing to memory pressure and destabilizing the Extension Host further. The Nx Console MCP was already in "minimal mode" with most tools disabled (replaced by Nx skills), making the server largely redundant.
2. Orphaned GitKraken MCP Server Registration
GitLens had been uninstalled, but its MCP server ID (user-eamodio.gitlens-extension-GitKraken) remained in Cursor's global state database. This caused unnecessary connection attempts to a server that no longer existed.
3. Heavy Extension Load
31 extensions were running at crash time, including several resource-intensive ones that were not actively needed:
| Extension | Purpose | Impact |
|---|---|---|
SpecStory.specstory-vscode |
Records AI conversations | Generates large files, watches file system |
yzane.markdown-pdf |
Markdown to PDF conversion | Rarely used, adds weight |
humao.rest-client |
HTTP request testing | Rarely used, adds weight |
mhutchie.git-graph |
Git history visualization | Moderate resource use |
redhat.vscode-yaml |
YAML language support | Moderate resource use |
4. Large Object Serialization Failures
The renderer log showed multiple "Unable to log remote console arguments Output omitted for a large object that exceeds the limits" errors immediately before the crash, indicating memory pressure from large data structures (likely AI conversation state).
Crash Timeline¶
Detailed log timeline:
| Time (UTC) | Event |
|---|---|
| 09:42:49 | Nx Console MCP server starts on port 9639, connects successfully |
| 09:45:14 | First Extension Host instability — MCP client recreated |
| 09:45:21 | MCP reconnection fails: ECONNREFUSED 127.0.0.1:9639 (4 attempts) |
| 09:47:36 | Multiple "Unknown bubble conversation handler" errors |
| 09:47:37 | Multiple "Unable to log large object" errors |
| 09:47:40 | Extension Host crashes — all 31 extensions terminated |
| 09:47:40 | Cursor begins automatic Extension Host restart |
| 09:47:43 | vscode.git-base activates (2ms) |
| 09:47:43 | vscode.git activates (424ms) — Source Control begins recovery |
| 09:47:46 | MCP reconnection fails again: ECONNREFUSED 127.0.0.1:9639 (4 attempts) |
| 09:47:47 | Source Control fully restored |
Security Audit Results¶
A security audit was performed on the local machine due to a concurrent crypto miner incident on the CI build agent. No indicators of compromise were found.
| Check | Result |
|---|---|
Processes running from /tmp |
None |
Executables in /tmp |
None |
| Listening ports | All legitimate (AirPlay, Cursor, Adobe, SimplyPrint NFC) |
| Network connections | All to known services (OneDrive, Cursor, Microsoft) |
| User crontab | Empty |
| Launch Agents / Daemons | All legitimate (Adobe, Malwarebytes, NordVPN, etc.) |
| SSH authorized_keys | File does not exist |
| Docker | Not running |
| Disk usage | 24% (37 GB free) |
The local machine was not affected by the build agent compromise. The CI attack vector (publicly exposed PostgreSQL) did not apply to the local environment.
Remediation Actions¶
Applied (2026-03-17)¶
| Action | Location | Detail |
|---|---|---|
| Disabled Nx Console MCP tools | Cursor settings.json |
"nxConsole.mcpToolsFilter": ["!*"] — disables all MCP tools; Nx skills provide equivalent functionality |
| Removed orphaned GitKraken MCP | Cursor global state.vscdb |
Removed user-eamodio.gitlens-extension-GitKraken from mcpService.knownServerIds |
| Disabled unused extensions | Cursor Extensions panel | User disabled: markdown-pdf, rest-client, and other rarely-used extensions |
| Archived SpecStory history | Filesystem | User moved .specstory/history to a backup location to reduce file system watching overhead and memory usage |
Configuration Change¶
Added to ~/Library/Application Support/Cursor/User/settings.json:
"nxConsole.mcpToolsFilter": ["!*"]
This disables all Nx Console MCP tools while keeping the extension itself functional for its UI features (project tree, generator UI, etc.). The Nx workspace skills defined in AGENTS.md provide the same capabilities that the MCP tools offered.
Impact (Initial Incident)¶
| Metric | Value |
|---|---|
| Data loss | None |
| Security impact | None |
| Productivity impact | Minor — intermittent 3-5 second Source Control disruptions |
| Frequency | Multiple times per session |
| Duration of issue | Unknown (noticed 2026-03-17, likely ongoing for days/weeks) |
Recurrence: Sustained Extension Host Crash Loop (2026-03-17, later session)¶
Symptoms¶
The extension host began crashing repeatedly with exit code 5 (native process crash), triggering a crash-restart loop. Unlike the initial incident (single crashes with recovery), this was a sustained loop — 7+ crashes in ~30 minutes — making the IDE largely unusable.
The Cursor main log showed a repeating pattern:
Extension host with pid XXXXX exited with code: 5, signal: unknown.
[UtilityProcess id: N, type: extensionHost, pid: XXXXX]: crashed with code 5 and reason 'crashed'
Crash Timeline (Recurrence)¶
| Time | PID | Exit Code | Interval Since Previous |
|---|---|---|---|
| 10:34:09 | 47559 | 5 | — |
| 10:54:11 | 51680 | 5 | 20 min |
| 10:55:49 | 62954 | 5 | 1.6 min |
| 10:57:25 | 65600 | 5 | 1.6 min |
| 11:00:01 | 68283 | 5 | 2.6 min |
| 11:01:55 | 71484 | 5 | 1.9 min |
| 11:07:52 | 82599 | 5 | 6 min (after reload) |
| 11:09:33 | 85733 | 5 | 1.7 min |
| 11:11:09 | 87419 | 5 | 1.6 min |
The pattern was clear: the extension host would restart, consume memory while re-indexing, and crash again within 1-2 minutes.
Root Cause Analysis (Recurrence)¶
The crash loop was caused by a combination of factors that amplified each other:
1. SpecStory history partially excluded from .cursorignore
The .cursorignore file only excluded .specstory/ai_rules_backups/, leaving .specstory/history/ (813 markdown files, 477 MB) fully visible to Cursor's retrieval/indexing system. The retrieval extension host (anysphere.cursor-retrieval / anysphere.cursor-always-local) was attempting to index all of this content.
2. Retrieval extension host resource consumption
The retrieval extension host process was consuming 660 MB RAM and 432% CPU (pegging 4+ cores) while indexing the SpecStory files. This left the system with virtually no free memory.
| Process | RSS | %CPU |
|---|---|---|
| extension-host (retrieval-always-local) | 660 MB | 432% |
| Cursor Renderer | 762 MB | 66% |
| extension-host (user) | 402 MB | 9% |
| extension-host (agent-exec) | 330 MB | 3% |
| git (triggered by indexer) | 310 MB | 79% |
Total Cursor memory consumption: ~2.6 GB.
3. System memory exhaustion
The machine (16 GB RAM) was down to 56 MB free pages (Pages free: 3573 at 16 KB/page). macOS was likely terminating the extension host process via memory pressure signals, manifesting as exit code 5.
4. Workspace storage bloat
- The workspace storage
images/cache had accumulated 845 files totaling 391 MB - The
state.vscdbdatabase was bloated — the storage layer reported a DB size of ~6.6 GB (DB size: 7089504256b) with a slow close warning (detected slow close() operation: Time: 7207ms) - The largest key was
aiCodeTrackingLinesat 1.5 MB
5. Window reload insufficient
A Developer: Reload Window did not resolve the issue because:
- The retrieval extension's in-memory index persisted across reloads
- The bloated workspace storage was re-loaded on each restart
- The .cursorignore update was not fully picked up without a cold start
Remediation Actions (Recurrence)¶
| Action | Detail | Impact |
|---|---|---|
Updated .cursorignore |
Changed .specstory/ai_rules_backups/ → .specstory/ to exclude entire directory |
Removed 477 MB (813 files) from indexing scope |
| Cleared workspace images cache | rm -rf on workspaceStorage/.../images/* |
Freed 391 MB |
VACUUM on state.vscdb |
Ran sqlite3 ... "VACUUM;" while Cursor was closed |
Compacted database from 6.4 MB to 1.8 MB |
| Full quit and relaunch | Cmd+Q instead of reload |
Fresh memory state, clean extension host processes |
| Cleared entire workspace storage | rm -rf ~/Library/Application\ Support/Cursor/User/workspaceStorage/aa64293d59ced24e9c943cf995ed4f74 |
Nuclear option — removed all cached state, indexes, images, and databases for this workspace; Cursor recreates the directory on next launch |
Workspace Storage VACUUM¶
The state.vscdb SQLite database can become bloated over time, especially after crash loops where the WAL (write-ahead log) grows without proper checkpointing. To compact it, run the following command while Cursor is fully closed (Cmd+Q, not just reload):
sqlite3 ~/Library/Application\ Support/Cursor/User/workspaceStorage/aa64293d59ced24e9c943cf995ed4f74/state.vscdb "VACUUM;"
Note: The workspace storage ID (
aa64293d...) is specific to this workspace. To find the ID for a different workspace, checkworkspace.jsoninside each folder under~/Library/Application Support/Cursor/User/workspaceStorage/.
This does not need to be run on a regular basis. Under normal operation, SQLite handles compaction automatically. Only run it as a diagnostic step if extension host crashes recur or Cursor logs report slow close operations (detected slow close() operation).
.cursorignore Change¶
- # SpecStory backup files
- .specstory/ai_rules_backups/
- ai_rules_backups/
+ # SpecStory (history files are ~500MB and cause indexer crashes)
+ .specstory/
Result After Remediation¶
| Metric | Before | After |
|---|---|---|
| Retrieval ext-host RSS | 660 MB | 200 MB |
| Retrieval ext-host CPU | 432% | 2.8% |
| state.vscdb size | 6.4 MB | 1.8 MB |
| Workspace images cache | 391 MB | 0 MB |
| Extension host crashes | 9 in 37 min | 0 |
| Extension host instance | [1-12] (12 restarts) | [1-1] (stable) |
The extension host stabilized after applying all four remediation steps and has not crashed since.
Lessons Learned¶
-
.cursorignoremust cover entire generated directories, not just subdirectories. Partially ignoring a large directory (onlyai_rules_backups/within.specstory/) left hundreds of megabytes of files exposed to the indexer. -
Window reload is not a cold restart. In-memory indexes and cached state survive a reload. A full quit (
Cmd+Q) is necessary when the extension host is in a crash loop. -
Workspace storage accumulates silently. The images cache (845 files, 391 MB) and bloated SQLite database grew over weeks without any visible warning until they contributed to crashes.
-
Monitor the retrieval extension host. On a 16 GB machine, the retrieval extension consuming 660 MB + 432% CPU is a clear warning sign. Checking
ps aux | grep cursorcan quickly identify runaway processes.
Overall Impact¶
| Metric | Value |
|---|---|
| Data loss | None |
| Security impact | None |
| Productivity impact | Significant during crash loop (~40 min of degraded IDE) |
| Total crashes observed | 9+ (exit code 5) |
| Time to resolution | ~40 min from first investigation to stable state |