{"record":{"id":"71a19e3687b5fcfe","repo":"jackwener/OpenCLI","slug":"opencli-notebooklm-note-list","errorCode":null,"errorMessage":"opencli notebooklm note-list","messagePattern":"opencli notebooklm note-list","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/notebooklm/note-list.js","lineNumber":21,"sourceCode":"import { NOTEBOOKLM_DOMAIN, NOTEBOOKLM_SITE } from './shared.js';\nimport { getNotebooklmPageState, listNotebooklmNotesFromPage, requireNotebooklmSession, } from './utils.js';\ncli({\n    site: NOTEBOOKLM_SITE,\n    name: 'note-list',\n    access: 'read',\n    aliases: ['notes-list'],\n    description: 'List saved notes from the Studio panel of the current NotebookLM notebook',\n    domain: NOTEBOOKLM_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    navigateBefore: false,\n    args: [],\n    columns: ['title', 'created_at', 'source', 'url'],\n    func: async (page) => {\n        await requireNotebooklmSession(page);\n        const state = await getNotebooklmPageState(page);\n        if (state.kind !== 'notebook') {\n            throw new EmptyResultError('opencli notebooklm note-list', 'No NotebookLM notebook is open in the adapter session. Run `opencli notebooklm open <notebook>` first.');\n        }\n        const rows = await listNotebooklmNotesFromPage(page);\n        if (rows.length > 0)\n            return rows;\n        throw new EmptyResultError('opencli notebooklm note-list', 'No NotebookLM notes are visible in the Studio panel. Reload the notebook page or close the note editor and retry.');\n    },\n});\n","sourceCodeStart":3,"sourceCodeEnd":29,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/notebooklm/note-list.js#L3-L29","documentation":"`opencli notebooklm note-list` throws this EmptyResultError when the adapter session is not currently on a notebook page. The command lists notes from the Studio panel, which only exists inside an open notebook, so it checks getNotebooklmPageState first and aborts if kind !== 'notebook'.","triggerScenarios":"Calling `opencli notebooklm note-list` with no prior `opencli notebooklm open <notebook>` in the session, or after the page has navigated away from the notebook (home page, sign-in redirect).","commonSituations":"Script ordering mistake where note-list runs before open; session cookie expiry redirecting to home; reusing a page object whose URL changed mid-script.","solutions":["Run `opencli notebooklm open <notebook-id-or-url>` before `note-list`.","Verify the notebook id with `opencli notebooklm list -f json`.","Re-authenticate if the session was redirected away from the notebook.","Keep the page on the notebook URL for the duration of note commands."],"exampleFix":"// before\nopencli notebooklm note-list\n// after\nopencli notebooklm open <notebook-id>\nopencli notebooklm note-list","handlingStrategy":"validation","validationCode":"if (!notebookId) throw new Error('note-list requires a notebook: run `opencli notebooklm open <notebook>` first');","typeGuard":null,"tryCatchPattern":"try {\n  notes = await run('opencli notebooklm note-list -f json');\n} catch (e) {\n  if (String(e.message).includes('No NotebookLM notebook is open')) {\n    await run('opencli notebooklm open <notebook-id>');\n    notes = await run('opencli notebooklm note-list -f json');\n  } else throw e;\n}","preventionTips":["Make `open <notebook>` a mandatory preceding step in scripts.","Store the opened notebook id and reuse it across commands.","Re-run `open` if any other navigation occurred.","Check for expired-session redirects before notebook-scoped calls."],"tags":["notebooklm","session-state","empty-result"],"backgroundTag":"empty-result-error","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}