{"record":{"id":"6de30c57bae8ab41","repo":"jackwener/OpenCLI","slug":"no-claude-conversation-history-was-visible-on-rec","errorCode":null,"errorMessage":"No Claude conversation history was visible on /recents.","messagePattern":"No Claude conversation history was visible on /recents\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/claude/history.js","lineNumber":29,"sourceCode":"    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [\n        { name: 'limit', type: 'int', default: 20, help: 'Max conversations to show' },\n    ],\n    columns: ['Index', 'Id', 'Title', 'Url'],\n\n    func: async (page, kwargs) => {\n        const limit = requirePositiveInt(\n            Number(kwargs.limit ?? 20),\n            'claude history --limit',\n            'Example: opencli claude history --limit 20',\n        );\n        const conversations = await getConversationList(page);\n        await ensureClaudeLogin(page, 'Claude history requires a logged-in Claude session.');\n        if (conversations.length === 0) {\n            throw new EmptyResultError('claude history', 'No Claude conversation history was visible on /recents.');\n        }\n        return conversations.slice(0, limit);\n    },\n});\n","sourceCodeStart":11,"sourceCodeEnd":34,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/claude/history.js#L11-L34","documentation":"This EmptyResultError is thrown by the `claude history` command when the /recents page loads and the user is logged in, but getConversationList extracts zero conversations. Since any active account has recent conversations, the library treats an empty list as a failure — most likely a scraping/DOM mismatch or a genuinely empty account.","triggerScenarios":"getConversationList(page) returns [] after ensureClaudeLogin on /recents — a brand-new account with no conversations, Claude's sidebar/recents DOM changed so selectors match nothing, or the list rendered slowly (lazy loading) and wasn't present when scraped.","commonSituations":"Newly created Claude account with no history; Claude frontend update renaming sidebar elements; slow network so conversation items load after extraction; account region/workspace view where recents are empty; ad-blocker/extension altering the page structure.","solutions":["Open https://claude.ai/recents in the browser and confirm conversations actually appear there","Re-run the command — lazy-loaded lists often appear a moment later; a retry after full page load usually succeeds","Send at least one message on claude.ai so the account has conversation history, then retry","Update the library if Claude changed its recents DOM — newer selectors may be required","Re-run `opencli claude auth` to ensure you're in the intended account/workspace"],"exampleFix":"// before\n// brand-new account, /recents empty -> EmptyResultError\n// after\n// send one chat on claude.ai, then:\nopencli claude history --limit 20","handlingStrategy":"retry","validationCode":"// confirm the account actually has conversations before scraping history\n// open https://claude.ai/recents in the browser and check the sidebar is non-empty\nconst cookies = await page.getCookies({ url: 'https://claude.ai' });\nif (!cookies.some(c => c.name === 'sessionKey' && c.value)) {\n  throw new Error('Run `opencli claude auth` first');\n}","typeGuard":"function hasConversations(list) {\n  return Array.isArray(list) && list.length > 0;\n}","tryCatchPattern":"try {\n  const conversations = await opencli.claude.history({ limit: 20 });\n} catch (e) {\n  if (e.message.includes('No Claude conversation history was visible')) {\n    await sleep(3000);                       // allow lazy-loaded list to paint\n    return opencli.claude.history({ limit: 20 });\n  }\n  throw e;\n}","preventionTips":["Use an account with existing conversation history","Wait for /recents to fully load before scraping (retry with delay)","Update the library when Claude changes its recents/sidebar DOM","Confirm in a normal browser that the account shows recents"],"tags":["claude","empty-result","scraping","dom"],"backgroundTag":"empty-scrape-result","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}