I’ve been using the Cline VSCode extension (formerly claude-dev) for several months with hundreds of tasks. The extension panel suddenly blanked out during an active session. After restarting VSCode, the History menu shows no historical sessions, though the “Delete All History” button indicates 268 MB of history data still exists.
The Developer Console shows the error:
Failed to parse task history: SyntaxError: Unexpected end of JSON input.
I’m running Cline version 3.35.0 on macOS with VSCode. All my task files appear intact in
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/tasks/,
but the extension cannot discover or display them. Task history disappears after a grey-screen crash or large context chat (>8MB) despite the underlying data remaining intact.
Troubleshooting Performed:
Database integrity check: Ran PRAGMA integrity_check on the VSCode state.vscdb database - returned “ok” for both main and backup databases.
Task file validation: Verified all 200+ task JSON files (
ui_messages.json,api_conversation_history.json,task_metadata.json) parse correctly as valid JSON with no corruption.Identified empty
taskHistory.json: Found that the following file was 0 bytes (empty):
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/state/taskHistory.json
Deleted corrupted index: Removed the empty
taskHistory.jsonfile and restarted VSCodeObserved failed migration: After restart, VSCode logs show:
[Storage Migration] No task history to migrate and FileContextTracker: Processed 0 tasks
Examined
task_metadata.jsonstructure: Found thattask_metadata.jsononly contains file context tracking and model usage, but lacks critical task display information (title, ID, creation timestamp) that Cline needs to populate the history UI.Confirmed version incompatibility: It appears tasks created with older Cline versions stored metadata differently than version 3.35.0 expects.
Questions:
Has anyone successfully restored Cline task history after this type of corruption, and if so, what method worked for you?
Is there a migration script or manual procedure to rebuild the
taskHistory.jsonindex from existing task files when the automatic migration fails?What metadata fields does Cline 3.35.0 require in
task_metadata.jsonor other files to properly display tasks in the history UI, and is there a way to reconstruct this information from the existingui_messages.jsonorapi_conversation_history.jsonfiles?