Cursor Chat History Lost After Node.js Installation + Restart

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After installing Node.js on Windows and restarting Cursor, all chat history became inaccessible and databases were wiped, leaving empty SQLite files. 4+ months of work lost.

Steps to Reproduce

WSL then install Nodejs

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Environment

  • OS: Windows 10 (Build 19045)
  • Cursor Version: 1.7.28 (current, but data loss happened BEFORE this version)
  • WSL: Ubuntu (was previously using WSL integration with Node.js installed in WSL)
  • Trigger: Installing Node.js on Windows (previously only had WSL Node.js)

Additional Information

September 30, 2025 (Evening) - WHEN DATA LOSS OCCURRED

  1. User had working Cursor with 4+ months of chat history
  2. User installed Node.js on Windows (previously only had Node.js in WSL environment)
  3. User closed and restarted Cursor
  4. :cross_mark: CURSOR PROMPTED FOR “FIRST-TIME SETUP” - as if it was a fresh installation
  5. :cross_mark: ALL CHAT HISTORY DISAPPEARED - could not access any previous conversations
  6. :cross_mark: Composer shows error: [composer] No composer data handle found
  7. Database files exist but contain 0 tables - completely empty

October 1, 2025 (Morning) - After Data Already Lost

  1. Cursor auto-updated to version 1.7.28 at 02:57 AM
  2. Problem persisted (but data was already lost on Sept 30)

Root Cause Analysis

The data loss occurred IMMEDIATELY after:

  1. Installing Node.js on Windows (environment change)
  2. Restarting Cursor

NOT after the 1.7.28 update (update happened later, data already gone)

What Likely Happened

  1. Cursor was configured to use WSL environment
  2. Installing Windows Node.js changed system PATH/environment variables
  3. Cursor detected environment change on restart
  4. Cursor reset to “first-time setup” mode instead of preserving existing data
  5. Existing workspace databases were wiped/reset during this process
  6. No warning given, no backup created

Technical Details

Database Status AFTER Node.js Install + Cursor Restart

Location: C:\Users\stefa\AppData\Roaming\Cursor\User\workspaceStorage\

Affected Workspace: f5c41ed54e617220258fdce14f2b477c

  • Project: automatio-ultima
  • Database files exist but are EMPTY:
    • state.vscdb (966,656 bytes)
    • state.vscdb.backup (966,656 bytes)
  • File type: Valid SQLite 3.x database (integrity check: OK)
  • Tables: 0 (ZERO) - completely empty
  • Last modified: After restart (data wiped)

Verification Command:

sqlite3 state.vscdb "SELECT name FROM sqlite_master WHERE type='table';"
# Returns: (empty)

ALL Workspaces Affected

Multiple workspace databases show the same issue - all have 0 tables:

  • f5c41ed54e617220258fdce14f2b477c (966KB - automatio-ultima)
  • 0fd3d8f2b07fec8c81cc948670ae5ea8 (4.8MB - automatio-ai-test-1)
  • 1ec9fe06d313cfe6ac6c555abf49bed5 (2.6MB - Nango project)

All databases have large file sizes but contain zero tables inside.

Console Errors After Restart

[composer] No composer data handle found [handleDeselectingComposer]
ERR rk: The editor could not be opened because the file was not found.
[KnowledgeBaseService] Error fetching git upstream URL: Error: No full commit provider registered
WARN No search provider registered for scheme: file, waiting

Reproduction Steps

  1. Have active Cursor installation with extensive chat history
  2. Use WSL environment with Node.js installed in WSL
  3. Install Node.js on Windows (creating dual Node.js environment)
  4. Close and restart Cursor
  5. :cross_mark: Cursor treats this as “first-time setup”
  6. :cross_mark: All chat history lost
  7. :cross_mark: Databases wiped to empty SQLite files

Expected Behavior

  • Installing Node.js on Windows should not affect Cursor’s data
  • Environment changes should not trigger data loss
  • Cursor should preserve chat history through restarts
  • If migration is needed, user should be warned and backup created

Actual Behavior

  • Cursor detected environment change (Node.js installation)
  • Treated restart as “first-time setup”
  • Wiped all workspace storage databases without warning
  • No migration, no backup, no recovery option
  • Data permanently lost (no previous versions available)

Impact

  • Severity: CRITICAL - Complete Data Loss
  • User Impact: 4+ months of daily AI conversations permanently lost
  • Reproducibility: Suspected to happen when environment changes (WSL ↔ Windows Node.js)
  • Workaround: None (data already destroyed)
  • Data Recovery: Impossible (databases contain 0 tables, integrity check passes but no data)

Additional Context

Previous Settings (Before Data Loss)

{
  "terminal.integrated.defaultProfile.windows": "Ubuntu (WSL)",
  "claudeCodeChat.wsl.enabled": true,
  "claudeCodeChat.wsl.distro": "Ubuntu",
  "claudeCodeChat.wsl.nodePath": "/home/stefan/.nvm/versions/node/v20.19.0/bin/node"
}

System State Before Issue

  • Node.js in WSL: v20.19.0
  • Cursor working normally with WSL integration
  • Active chat history (4+ months, multiple projects)

System State After Node.js Install

  • Node.js in Windows: Installed (version unknown)
  • Node.js in WSL: Still present (v20.19.0)
  • Cursor: Prompted “first-time setup”
  • Chat history: Gone (databases empty)

Extension Storage

Extension folders exist but are empty:

  • AndrePimenta.claude-code-chat/conversations - EMPTY
  • AndrePimenta.claude-code-chat/backups - EMPTY
  • No chat data found anywhere

Similar Issues?

This appears related to how Cursor handles:

  • Environment variable changes (PATH modifications)
  • WSL ↔ Windows mode switching
  • Workspace storage initialization on environment change

Question for Cursor team: Does Cursor wipe workspace storage when detecting environment changes? If so, why no warning/backup?

Requests

Immediate Actions Needed

  1. Investigate: Why does environment change trigger data wipe?
  2. Fix: Preserve workspace data through environment changes
  3. Warn: Alert users before any destructive operations
  4. Backup: Auto-backup databases before risky operations

Long-term Solutions

  1. Implement chat history export/import functionality
  2. Add cloud sync option for chat history
  3. Create automatic local backups of workspace storage
  4. Validate data migration before wiping old data
  5. Add “Safe Mode” that preserves data when environment issues detected

Contact Information

  • User: Stefan
  • Email: [Add your email]
  • Available for: Testing fixes, providing more logs, debugging sessions

CRITICAL: This is not about a faulty update - this is about Cursor wiping user data when system environment changes (Node.js installation). This could affect many users who switch between WSL/Windows or change development environments.

The data loss happened ON RESTART after Node.js installation, NOT during the 1.7.28 update.

Generated: October 1, 2025

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