{"record":{"id":"80b1b21d7308c8e3","repo":"jackwener/OpenCLI","slug":"no-visible-claude-messages-were-found-in-the-curre","errorCode":null,"errorMessage":"No visible Claude messages were found in the current conversation.","messagePattern":"No visible Claude messages were found in the current conversation\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/claude/read.js","lineNumber":25,"sourceCode":"    name: 'read',\n    access: 'read',\n    description: 'Read the current Claude conversation',\n    domain: CLAUDE_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [],\n    columns: ['Index', 'Role', 'Text'],\n\n    func: async (page) => {\n        // ensureOnClaude now waits for the composer selector; the previous post-nav\n        // 3 s settle is covered by that event-based wait.\n        await ensureOnClaude(page);\n        await ensureClaudeLogin(page, 'Claude read requires a logged-in Claude session.');\n        const messages = await getVisibleMessages(page);\n        if (messages.length > 0) return messages;\n        throw new EmptyResultError('claude read', 'No visible Claude messages were found in the current conversation.');\n    },\n});\n","sourceCodeStart":7,"sourceCodeEnd":28,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/claude/read.js#L7-L28","documentation":"This EmptyResultError is thrown by the `claude read` command when, after ensuring the browser is on the Claude app page with a visible composer and a logged-in session, getVisibleMessages extracts zero messages from the current conversation. The library refuses to return an empty transcript, treating it as a failed read.","triggerScenarios":"getVisibleMessages(page) returns [] on the current claude.ai conversation page — the conversation is empty (new chat, nothing sent yet), a login/error redirect replaced the transcript, lazy rendering hasn't painted messages yet, or a Claude DOM change broke the message selectors.","commonSituations":"Running `claude read` on a freshly opened New Chat with no messages; temporary Claude error banner replacing the transcript; slow rendering on a long conversation; Claude frontend update changing message markup; scraper landing on the wrong tab of the app.","solutions":["Ensure the current conversation actually has messages — send one in the browser or navigate to an existing conversation, then retry","Re-run the command after waiting for the page to fully render; slow painting is the most common cause","Verify in the browser that the transcript is visible (not an error/login banner)","Re-run `opencli claude auth` to rule out a silent login-redirect state","Update the library if Claude changed its DOM — message selectors may need a newer version"],"exampleFix":"// before\n// `claude read` on a blank New Chat -> EmptyResultError\n// after\nopencli claude send \"hello\"       # create content in the conversation\nopencli claude read","handlingStrategy":"retry","validationCode":"// only read conversations that have content\nconst history = await opencli.claude.history({ limit: 1 });\nif (!history.length) throw new Error('No conversations exist to read — send a message first');","typeGuard":"function hasVisibleMessages(messages) {\n  return Array.isArray(messages) && messages.length > 0;\n}","tryCatchPattern":"try {\n  const messages = await opencli.claude.read();\n} catch (e) {\n  if (e.message.includes('No visible Claude messages were found')) {\n    await sleep(3000);                       // wait for transcript to render\n    return opencli.claude.read();\n  }\n  throw e;\n}","preventionTips":["Never run `claude read` on a blank New Chat — send a message first or navigate to an existing conversation","Wait for full page render before reading long transcripts","Check in the browser that a transcript (not an error banner) is displayed","Update the library when Claude changes message markup"],"tags":["claude","empty-result","scraping","dom"],"backgroundTag":"empty-scrape-result","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}