{"record":{"id":"b05f3b3f9d256d13","repo":"jackwener/OpenCLI","slug":"antigravity-recent-paths-recent-paths-list-is-emp","errorCode":null,"errorMessage":"antigravity recent-paths: Recent paths list is empty.","messagePattern":"antigravity recent-paths: Recent paths list is empty\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"info","filePath":"clis/antigravity/storage.js","lineNumber":269,"sourceCode":"\n// ====== FS-side: recent-paths ======\ncli({\n    site: 'antigravity',\n    name: 'recent-paths',\n    access: 'read',\n    description: 'Show Antigravity\\'s recently-opened folders/files (history.recentlyOpenedPathsList).',\n    domain: 'localhost',\n    strategy: Strategy.LOCAL,\n    browser: false,\n    args: [\n        { name: 'limit', type: 'int', required: false, default: 20, help: 'Max rows to return' },\n    ],\n    columns: STORAGE_COLUMNS,\n    func: async (args) => {\n        const val = getValue(AG_GLOBAL_STATE_DB, 'history.recentlyOpenedPathsList');\n        if (!val) throw new EmptyResultError('antigravity recent-paths', 'No recent paths recorded.');\n        const entries = val.entries || [];\n        if (!entries.length) throw new EmptyResultError('antigravity recent-paths', 'Recent paths list is empty.');\n        const limit = Number.isInteger(args?.limit) && args.limit > 0 ? args.limit : 20;\n        return entries.slice(0, limit).map((e, i) => {\n            let kind = 'other', target = JSON.stringify(e).slice(0, 200);\n            if (e.folderUri) {\n                kind = 'folder';\n                target = decodeURI(String(e.folderUri).replace(/^file:\\/\\//, ''));\n            } else if (e.fileUri) {\n                kind = 'file';\n                target = decodeURI(String(e.fileUri).replace(/^file:\\/\\//, ''));\n            } else if (e.workspace?.configPath) {\n                kind = 'workspace';\n                target = decodeURI(String(e.workspace.configPath).replace(/^file:\\/\\//, ''));\n            }\n            return { Index: i + 1, Kind: kind, Path: target };\n        });\n    },\n});\n","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/antigravity/storage.js#L251-L287","documentation":"Thrown by `antigravity recent-paths` when the key `history.recentlyOpenedPathsList` exists in the global state DB but its `entries` array is empty (or absent). Distinct from error 260: the record exists, but there is nothing in the list to render. The library throws an EmptyResultError rather than returning an empty table so callers know the data source was reachable.","triggerScenarios":"Running `opencli antigravity recent-paths` when val exists but `val.entries` is missing or has length 0 in AG_GLOBAL_STATE_DB.","commonSituations":"User cleared 'recently opened' from within Antigravity; state was reset by an update or profile migration; the key exists from a template but was never populated.","solutions":["Open some files or folders in Antigravity to populate the recent list, then rerun","Inspect the value: sqlite3 state.vscdb \"SELECT value FROM ItemTable WHERE key='history.recentlyOpenedPathsList';\" to confirm entries is empty","If the list was cleared accidentally, restore state.vscdb from a backup"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const raw = execFileSync('/usr/bin/sqlite3',\n  [dbPath, \"SELECT value FROM ItemTable WHERE key='history.recentlyOpenedPathsList';\"],\n  { encoding: 'utf-8' }).trim();\nconst val = raw ? JSON.parse(raw) : null;\nif (!val?.entries?.length) console.log('Recent list empty; proceeding with defaults.');","typeGuard":"function hasEntries(v) {\n  return v != null && typeof v === 'object' && Array.isArray(v.entries) && v.entries.length > 0;\n}","tryCatchPattern":"try {\n  await cli.run(['antigravity', 'recent-paths']);\n} catch (e) {\n  if (e.name === 'EmptyResultError') return { entries: [] }; // graceful empty fallback\n  throw e;\n}","preventionTips":["Treat empty history as a normal state on fresh/reset profiles","Avoid workflows that clear recently-opened items before your script runs","Back up state.vscdb before profile migrations"],"tags":["empty-result","state-database","antigravity"],"backgroundTag":"empty-query-result","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}