jackwener/OpenCLI · warning · EmptyResultError
No conversation history found in Cursor.
Error message
No conversation history found in Cursor.
What it means
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.
Source
Thrown at clis/cursor/read.js:41
let text = '';
// Try to get structured markdown root for AI, or lexical text for human
const markdownRoot = msg.querySelector('.markdown-root');
if (markdownRoot) {
text = markdownRoot.innerText || markdownRoot.textContent;
} else {
text = msg.innerText || msg.textContent;
}
return {
Role: role === 'human' ? 'User' : 'Assistant',
Text: text.trim()
};
});
})()
`);
if (!history || history.length === 0) {
throw new EmptyResultError('cursor read', 'No conversation history found in Cursor.');
}
return history;
},
});
View on GitHub (pinned to 49907e53dc)
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
Example fix
// before opencli cursor read // Error: No conversation history found in Cursor. // after opencli cursor read || echo 'No Cursor history yet — start a chat in Cursor first'
Defensive patterns
Strategy: fallback
Validate before calling
// Nothing to validate before the call; detect emptiness after instead. const history = await cursorRead();
Type guard
function hasHistory(h) {
return Array.isArray(h) && h.length > 0 && h.every(e => e && typeof e.text === 'string');
} Try / catch
let history;
try {
history = await cursorRead();
} catch (err) {
if (/No conversation history found/i.test(err.message)) {
history = []; // treat as empty, not fatal
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
- CoinGecko returned no category data.
- coingecko top
- coingecko returned no trending coins.
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/9bfd608413d571cc.
Report an issue: GitHub.