{"record":{"id":"3d7df24950a92888","repo":"jackwener/OpenCLI","slug":"no-codex-projects-matched-kwargs-project-n","errorCode":null,"errorMessage":"No Codex projects matched \"${kwargs.project}\". / No Codex projects were visible. Open the Codex sidebar and retry.","messagePattern":"No Codex projects matched \"(.+?)\"\\. / No Codex projects were visible\\. Open the Codex sidebar and retry\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/codex/projects.js","lineNumber":22,"sourceCode":"\nexport const projectsCommand = cli({\n    site: 'codex',\n    name: 'projects',\n    access: 'read',\n    description: 'List Codex projects and visible conversations from the sidebar',\n    domain: 'localhost',\n    strategy: Strategy.UI,\n    browser: true,\n    args: [\n        { name: 'project', required: false, help: 'Filter by project label or path' },\n        { name: 'limit', required: false, help: 'Max conversations per project' },\n    ],\n    columns: ['Project', 'Index', 'Title', 'Updated', 'Active'],\n    func: async (page, kwargs) => {\n        const projects = await readCodexProjects(page);\n        const rows = flattenCodexProjects(projects, kwargs);\n        if (rows.length === 0) {\n            throw new EmptyResultError('codex projects', kwargs.project\n                ? `No Codex projects matched \"${kwargs.project}\".`\n                : 'No Codex projects were visible. Open the Codex sidebar and retry.');\n        }\n        return rows;\n    },\n});\n","sourceCodeStart":4,"sourceCodeEnd":29,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/codex/projects.js#L4-L29","documentation":"The Codex projects list command found zero projects to display. The library throws EmptyResultError when readCodexProjects returns data but no rows survive filtering, or when nothing at all was visible, to give a clear signal instead of printing an empty table.","triggerScenarios":"Running the codex projects command with a --project filter that matches none of the visible Codex projects, or running it with no filter when readCodexProjects(page) returns an empty projects list from the Codex sidebar.","commonSituations":"Typo or wrong casing in the project filter name; Codex sidebar not loaded or collapsed (projects never rendered); being on a fresh Codex workspace with no projects yet; stale page state where the projects panel hasn't hydrated yet.","solutions":["Re-run without the --project filter to see all visible projects and their exact names, then match one exactly.","Open the Codex sidebar in the browser and confirm projects are visible and loaded before retrying.","If no projects exist yet, create/open a project in Codex first.","Retry after the page finishes loading, in case the sidebar was still hydrating."],"exampleFix":"// before\n$ codex projects --project \"my-proj\"\n// EmptyResultError: No Codex projects matched \"my-proj\".\n\n// after: list everything first to find the exact name\n$ codex projects\n$ codex projects --project \"My Proj\"","handlingStrategy":"validation","validationCode":"const visible = await listCodexProjects(); // run without filter\nconst name = kwargs.project;\nif (name && !visible.some(p => p.title === name)) {\n  throw new Error(`Unknown project \"${name}\". Available: ${visible.map(p => p.title).join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const rows = await codexProjects({ project: name });\n} catch (e) {\n  if (e instanceof EmptyResultError) {\n    console.warn('No projects; showing all instead.');\n    return codexProjects({});\n  }\n  throw e;\n}","preventionTips":["List projects without a filter first and copy the exact name.","Ensure the Codex sidebar is open and loaded before automating.","Treat empty results as a warning path with a fallback, not a crash."],"tags":["empty-result","filter-mismatch","codex","ui-automation"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}