{"record":{"id":"9bfd608413d571cc","repo":"jackwener/OpenCLI","slug":"no-conversation-history-found-in-cursor","errorCode":null,"errorMessage":"No conversation history found in Cursor.","messagePattern":"No conversation history found in Cursor\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/cursor/read.js","lineNumber":41,"sourceCode":"            let text = '';\n            \n            // Try to get structured markdown root for AI, or lexical text for human\n            const markdownRoot = msg.querySelector('.markdown-root');\n            if (markdownRoot) {\n                text = markdownRoot.innerText || markdownRoot.textContent;\n            } else {\n                text = msg.innerText || msg.textContent;\n            }\n\n            return {\n                Role: role === 'human' ? 'User' : 'Assistant',\n                Text: text.trim()\n            };\n        });\n      })()\n    `);\n        if (!history || history.length === 0) {\n            throw new EmptyResultError('cursor read', 'No conversation history found in Cursor.');\n        }\n        return history;\n    },\n});\n","sourceCodeStart":23,"sourceCodeEnd":46,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/cursor/read.js#L23-L46","documentation":"Thrown by the Cursor read command when the browser-side script extracts conversation history but returns an empty or null list. The library throws it to signal that Cursor is installed/reachable but contains no readable conversation data, distinguishing 'empty data' from a hard failure.","triggerScenarios":"Running the cursor read CLI command when Cursor has no chat/conversation history stored on disk, the history storage is empty, or the extraction script in the Cursor editor context returns an empty array.","commonSituations":"Fresh Cursor installation with no chats yet; user cleared all conversations; wrong Cursor profile/workspace selected; Cursor changed its internal history storage layout so the extraction finds nothing.","solutions":["Open Cursor and confirm at least one conversation exists in the history panel","Verify the CLI is pointing at the correct Cursor profile/user-data directory","Update the CLI in case Cursor changed its storage format","If history genuinely should exist, inspect Cursor's state storage manually for corruption"],"exampleFix":"// before\nopencli cursor read\n// Error: No conversation history found in Cursor.\n// after\nopencli cursor read || echo 'No Cursor history yet — start a chat in Cursor first'","handlingStrategy":"fallback","validationCode":"// Nothing to validate before the call; detect emptiness after instead.\nconst history = await cursorRead();","typeGuard":"function hasHistory(h) {\n  return Array.isArray(h) && h.length > 0 && h.every(e => e && typeof e.text === 'string');\n}","tryCatchPattern":"let history;\ntry {\n  history = await cursorRead();\n} catch (err) {\n  if (/No conversation history found/i.test(err.message)) {\n    history = []; // treat as empty, not fatal\n  } else throw err;\n}","preventionTips":["Check Cursor has at least one saved conversation before scripting reads","Pin the CLI version against the Cursor version you target","Treat empty history as a normal state in automation (don't fail pipelines)","Log which Cursor profile/data directory was read"],"tags":["cursor","empty-result","cli"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}