The Problem: After an update or Windows restart, Cursor gets stuck in an infinite “Loading Chat” loop and fails to load history. This happens because the main database file (state.vscdb) became corrupted, but Cursor created an emergency backup file that it cannot restore automatically.
Diagnosis: Checking the folder structure in %APPDATA%\Cursor\User\globalStorage revealed the presence of files named state.vscdb.corrupted.... This confirmed that my data wasn’t deleted, but moved to a file Cursor stopped reading.
The Solution
Step 1: Close Cursor Ensure Cursor is completely closed (check Task Manager if necessary) to unlock the database files.
Step 2: Access the Global Data Folder
Press Win + R on your keyboard.
Type the command below and hit Enter: %APPDATA%\Cursor\User\globalStorage
Step 3: Identify and Swap the Files You will see three types of important files:
state.vscdb (The current file that is stuck/broken).
state.vscdb.backup (A standard automatic backup).
state.vscdb.corrupted.1767... (THE FILE WITH YOUR DATA! The number will be different on your PC).
Do the following:
Create a new folder named OLD and move the state.vscdb and state.vscdb.backup files into it (this clears the area without permanently deleting anything).
Locate the long file containing .corrupted. in its name.
Rename this file to simply: state.vscdb.
Step 4: Open Cursor Upon launching, Cursor will read the file you renamed. Since it contains the healthy data from before the crash, your chats and settings should reappear immediately.
Contact & Partnerships: If this guide saved your day and you’d like to reach out for partnerships, contact me at: [email protected](I’m a dev from Brazil, and keeping up with the Cursor Pro subscription is a real struggle! )
I cant open history chat 20d ago, it stuck on ‘loading chat’. No corrupted file found in that location. I only get state.vscdb, state.vscdb.backup, state.vscdb.options.json, state.vscdb-shm state.vscdb-wal and storage.json.
Really need that history chat…
Toggle Developers Tools console output:
ERR An unknown error occurred. Please consult the log for more details. Object[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()defineGetter: ƒ defineGetter()defineSetter: ƒ defineSetter()lookupGetter: ƒ lookupGetter()lookupSetter: ƒ lookupSetter()proto: (…)get proto: ƒ proto()set proto: ƒ proto()
error @ workbench.desktop.main.js:55
workbench.desktop.main.js:15616 Error: [composer] No composer data handle found
at uv.updateComposerData (workbench.desktop.main.js:646:15661)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at W0.updateComposer (workbench.desktop.main.js:13849:19053)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at W0.showComposerHistory (workbench.desktop.main.js:13857:2868)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at Nau.run (workbench.desktop.main.js:13059:7941)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at handler (workbench.desktop.main.js:54:18354)
at KHo.invokeFunction (workbench.desktop.main.js:14076:960)
at workbench.desktop.main.js:13614:3145
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at NSo._tryExecuteCommand (workbench.desktop.main.js:13614:2998)
at NSo.executeCommandImpl (workbench.desktop.main.js:13614:2243)
at NSo.executeCommand (workbench.desktop.main.js:13614:1896)
at Kes.run (workbench.desktop.main.js:54:35025)
at Cx.runAction (workbench.desktop.main.js:52:53162)
at Cx.run (workbench.desktop.main.js:52:53065)
at RP.onClick (workbench.desktop.main.js:437:93499)
at HTMLLIElement. (workbench.desktop.main.js:421:17700)
onDidChangeNotification @ workbench.desktop.main.js:15616
2workbench.desktop.main.js:15616 Error: [composer] No composer data handle found
at uv.updateComposerData (workbench.desktop.main.js:646:15661)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at W0.updateComposer (workbench.desktop.main.js:13849:19053)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at W0.showComposerHistory (workbench.desktop.main.js:13857:2868)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at Nau.run (workbench.desktop.main.js:13059:7941)
at workbench.desktop.main.js:52:45021
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at n.value (workbench.desktop.main.js:52:45010)
at handler (workbench.desktop.main.js:54:18354)
at KHo.invokeFunction (workbench.desktop.main.js:14076:960)
at workbench.desktop.main.js:13614:3145
at VSr (workbench.desktop.main.js:52:44707)
at Y9 (workbench.desktop.main.js:52:44668)
at NSo._tryExecuteCommand (workbench.desktop.main.js:13614:2998)
at NSo.executeCommandImpl (workbench.desktop.main.js:13614:2243)
at NSo.executeCommand (workbench.desktop.main.js:13614:1896)
at Kes.run (workbench.desktop.main.js:54:35025)
at Cx.runAction (workbench.desktop.main.js:52:53162)
at Cx.run (workbench.desktop.main.js:52:53065)
at RP.onClick (workbench.desktop.main.js:437:93499)
at HTMLLIElement. (workbench.desktop.main.js:421:17700)
onDidChangeNotification @ workbench.desktop.main.js:15616
(anonymous) @ workbench.desktop.main.js:15616
_deliver @ workbench.desktop.main.js:49
_deliverQueue @ workbench.desktop.main.js:49
fire @ workbench.desktop.main.js:49
addNotification @ workbench.desktop.main.js:10416
error @ workbench.desktop.main.js:13630
(anonymous) @ workbench.desktop.main.js:13084
_deliver @ workbench.desktop.main.js:49
_deliverQueue @ workbench.desktop.main.js:49
fire @ workbench.desktop.main.js:49
run @ workbench.desktop.main.js:52
await in run
onClick @ workbench.desktop.main.js:437
(anonymous) @ workbench.desktop.main.js:421