“Open Chat as Editor” causes permanent black screen when reopening project

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hello Cursor Support Team,

I would like to report a critical bug in the Cursor IDE that renders a project completely unusable.

Issue Description:
When using a Chat and clicking the three-dot menu, then selecting “Open Chat as Editor”, the following happens:

The chat remains in the same window and remains stuck on “Loading Chat” indefinitely.

The chat cannot be closed afterward (the X is not working / close all chat doesn’t help).

At this point, the rest of the IDE still appears to work.

Severe Follow-up Issue:
After restarting Cursor and reopening the same project folder, a major UI failure occurs:

Cursor shows a complete black screen inside the IDE.

No text, UI elements, or clickable areas are visible.

The application becomes entirely unusable for that folder.

Restarting Cursor again does not resolve the issue.

Limited Workaround:

The only way to regain usability is to open a different folder.

The affected project folder remains broken and cannot be used anymore and needs to be deleted.

Impact:

Active projects become inaccessible

Significant productivity loss (loosing the chathistory from other chats)

Very disruptive in daily development work

Thank you for your support.

Best regards,
Nico

Steps to Reproduce

press “new agent” and in the new chat window on the more option / three dots and then on “Open Chat as Editor”. Try closing the Chat (shouldn’t work) and restart cursor (and open the same project)

Expected Behavior

“Open Chat as Editor” should load correctly as before.
Reopening a project folder should never result in a total UI black screen.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.34 (user setup)
VSCode Version: 1.105.1
Commit: 643ba67cd252e2888e296dd0cf34a0c5d7625b90
Date: 2026-01-10T21:17:10.428Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

Yes. This happened with me too.

Checkout this thread [Recommended]: Open chat as editor bug - #3 by deanrie

Solution that worked for me:

  • Uninstall the cursor
  • Take a backup of C:/Users//.cursor directory (If you have plans, rules, commands, etc. that you don’t want to lose)
  • Remove all data
    rd /s /q “%AppData%\Cursor”
    rd /s /q “%LocalAppData%\Cursor”
    rd /s /q “%UserProfile%.cursor”
    del /f /q “%UserProfile%.cursor*”
  • Fresh reinstall cursor

And avoid using “Open chat as editor”. It’s buggy and is causing issues. You can try dragging the chat tab to editor window as a workaround.

You can also try this if that doesn’t works.

While trying to reproduce this, it completely borked my Cursor install. :cry:

Seems to only happen when opening a new chat as an editor before it has any content. Was that your experience as well @ashish8545?

Will file a bug with the team.

Well @Colin, the bug that @Nicolas_Ziegler reported, I faced it when I was connected with remote SSH to a linux machine. Cursor was updated from 2.2.x to 2.3.x. The directory was open and I tried “Open chat as editor” and it went into loading state.
Next time when I was trying to remote SSH and open the same directory it was going black just like it is reported above. So, I need to select the parent directory when we do “Open Folder” and it loaded.

And so, I completely removed cursor and it’s related files from my windows machine and from the remote Linux machine removed ~/.cursor-server and ~/.cursor

Fresh installed Cursor, connected with SSH to my Linux machine and opened the same directory (which I was unable to open and was going black) and it worked!

So that’s my overall experience.
Still “Open chat as editor” isn’t working as it should. I have raised a topic for same here - Duplicate chat panels shown when "Open chat as editor" is enabled + add icon creates tab in wrong panel
Although, I never mentioned this issue in any thread because I thought it might be own issue.

It looks like the state.vscdb file was corrupted by the “Open Chat as Editor” feature. Here’s a potential workaround:(this won’t affect your Cursor settings for other projects):

Steps to resolve:

  1. Locate and backup your workspace storage:

    • Navigate to: %AppData%\Cursor\User\workspaceStorage\ Iterate through each <hashcode> subdirectory

    • Open the workspace.json file in each directory

    • Look for the one containing your project path to identify the correct directory

    • Locate the state.vscdb, state.vscdb.backup file in the correct directory

    • Rename them to create a backup (e.g., state.vscdb.backup.bb)

  1. Reset the workspace state:

    • Reopen your project in Cursor

    • A fresh state.vscdb file will be automatically created

  2. Recovery question:

    • Does anyone know how to recover chat history from the backed-up state.vscdb file?

Summary

After using the “Open Chat as Editor” feature, reopening the project results in a permanent black screen that prevents Cursor from loading properly.

Environment

  • OS: Linux (Ubuntu 24.04 via WSL)
  • Cursor Version: 2.3.35
  • Workspace: Local project

Steps to Reproduce

  1. Open any project in Cursor
  2. Open a chat/composer session
  3. Click “Open Chat as Editor” option
  4. Close Cursor
  5. Reopen the same project
  6. Result: Black screen - Cursor UI doesn’t load

Root Cause

The issue is caused by corrupted data in the workspace’s state.vscdb SQLite database, specifically in the composer.composerData key:

  1. Corrupted selection state: The selectedComposerIds and lastFocusedComposerIds arrays contain objects like {"preserveFocus":false} instead of actual composer ID strings
  2. Incomplete composer entries: Some entries in allComposers array are missing required fields (like name, subtitle, lastUpdatedAt)

Example of corrupted data:

{
  "selectedComposerIds": [{"preserveFocus": false}, {"preserveFocus": false}],
  "lastFocusedComposerIds": [{"preserveFocus": false}],
  "allComposers": [
    // ... valid entries ...
    {
      "type": "head",
      "composerId": "e9744bdd-e78c-4ef7-b873-f0253553abbc",
      "createdAt": 1763349950948,
      "unifiedMode": "chat",
      // Missing: name, subtitle, lastUpdatedAt, etc.
    }
  ]
}

Workaround

IMPORTANT: Close Cursor completely before applying any fix!

Users can fix this by editing the state.vscdb file directly:

Location of state.vscdb:

  • Linux: ~/.config/Cursor/User/workspaceStorage/<workspace-id>/state.vscdb
  • macOS: ~/Library/Application Support/Cursor/User/workspaceStorage/<workspace-id>/state.vscdb
  • Windows: %APPDATA%\Cursor\User\workspaceStorage\<workspace-id>\state.vscdb

Method 1: Python Script (Recommended - Preserves Chat History)

Save this as fix_cursor_black_screen.py:

#!/usr/bin/env python3
import sqlite3
import json
import sys

DB_PATH = "./state.vscdb"

def fix_composer_data(db_path):
    """Fix corrupted composer.composerData that causes black screen"""
    
    conn = sqlite3.connect(db_path)
    cursor = conn.cursor()
    
    try:
        # Get current composer data
        cursor.execute("SELECT value FROM ItemTable WHERE key = 'composer.composerData'")
        result = cursor.fetchone()
        
        if not result:
            print("No composer.composerData found - nothing to fix")
            return True
        
        # Parse JSON
        composer_data = json.loads(result[0])
        
        # Remove incomplete composer entries (missing critical fields)
        original_count = len(composer_data.get('allComposers', []))
        composer_data['allComposers'] = [
            c for c in composer_data.get('allComposers', [])
            if 'name' in c or 'subtitle' in c or 'lastUpdatedAt' in c
        ]
        new_count = len(composer_data['allComposers'])
        
        # Fix corrupted selection arrays
        composer_data['selectedComposerIds'] = []
        composer_data['lastFocusedComposerIds'] = []
        
        # Update database
        updated_json = json.dumps(composer_data, separators=(',', ':'))
        cursor.execute(
            "UPDATE ItemTable SET value = ? WHERE key = 'composer.composerData'",
            (updated_json,)
        )
        
        conn.commit()
        print("✓ Successfully fixed composer.composerData")
        print(f"  Removed {original_count - new_count} incomplete composer entries")
        print(f"  Cleared corrupted selection state")
        return True
        
    except Exception as e:
        print(f"Error: {e}")
        return False
    finally:
        conn.close()

if __name__ == "__main__":
    print("Fixing Cursor black screen issue...")
    success = fix_composer_data(DB_PATH)
    if success:
        print("\n✓ Fix complete! You can now restart Cursor.")
    else:
        print("\n✗ Fix failed. You may need to delete state.vscdb entirely.")
    sys.exit(0 if success else 1)

Run it:

# Navigate to your workspace storage directory
cd ~/.config/Cursor/User/workspaceStorage/<workspace-id>/

# Run the fix
python3 fix_cursor_black_screen.py

Method 2: SQL Command (Quick Fix)

# Close Cursor first!
cd ~/.config/Cursor/User/workspaceStorage/<workspace-id>/

sqlite3 "./state.vscdb" "
UPDATE ItemTable 
SET value = json_set(
  value,
  '$.selectedComposerIds', json('[]'),
  '$.lastFocusedComposerIds', json('[]')
)
WHERE key = 'composer.composerData';
"

This clears the corrupted selection state but doesn’t remove incomplete entries.

Method 3: Nuclear Option (Loses Chat History)

# Delete the entire state database (Cursor will recreate it)
rm state.vscdb

Recommendation: Use Method 1 (Python script) as it preserves your chat history while fixing the corruption.

Additional Notes

Deleting the entire state.vscdb file fixes the black screen but causes loss of all chat/composer history. The surgical fix above preserves chat history while fixing the corruption.

3 Likes

Your Method 2 worked perfectly! The black screen issue is completely resolved, and I was able to preserve my chat history.

Still exists. Same issue. Fixed deleting state.vscdb

Version: 2.3.41 (system setup)
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

Method 2 worked for me.

Simple and painless. Thank you!

Method 2 worked just as advertised, Cursor is working again, and my chat history is restored. Thank you @satriowputra

Looks like I’m having the same issues on Windows, except I cant open any projects

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After selecting open chat as Editor ide shows only blackscreen

Steps to Reproduce

  1. Select chat menu
  2. Select open chat as Editor

Expected Behavior

Something is shown

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.4.23 (user setup)
VSCode Version: 1.105.1
Commit: 379934e04d2b3290cf7aefa14560f942e4212920
Date: 2026-01-29T21:24:23.350Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.19045

Does this stop you from using Cursor

Yes - Cursor is unusable

Method 1 worked too, chat history restored, thank you @satriowputra !

Hey all!

I can no longer reproduce this on 2.4.31. Please let me know if you still face an issue on the latest version.

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