{"record":{"id":"da903436cce3563f","repo":"jackwener/OpenCLI","slug":"no-workspace-storage-entries","errorCode":null,"errorMessage":"No workspace storage entries.","messagePattern":"No workspace storage entries\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"info","filePath":"clis/trae-solo/workspaces-fs.js","lineNumber":46,"sourceCode":"    browser: false,\n    strategy: Strategy.LOCAL,\n    args: [\n        { name: 'limit', type: 'int', required: false, default: 100 },\n    ],\n    columns: ['Index', 'Workspace Id', 'Kind', 'Target', 'Modified', 'Id', 'Version', 'Source', 'Installed'],\n    func: async (args) => {\n        if (!fs.existsSync(TRAE_WORKSPACE_STORAGE)) {\n            throw new CommandExecutionError(\n                `workspaceStorage not found: ${TRAE_WORKSPACE_STORAGE}`,\n                '',\n            );\n        }\n        const dirs = fs.readdirSync(TRAE_WORKSPACE_STORAGE).filter((n) => {\n            const full = path.join(TRAE_WORKSPACE_STORAGE, n);\n            return fs.statSync(full).isDirectory();\n        });\n        if (!dirs.length) {\n            throw new EmptyResultError('trae-solo workspaces-list', 'No workspace storage entries.');\n        }\n        const rows = dirs.map((id) => {\n            const dir = path.join(TRAE_WORKSPACE_STORAGE, id);\n            const wj = path.join(dir, 'workspace.json');\n            const resolved = resolveWorkspaceJson(wj);\n            const mtime = fs.statSync(dir).mtimeMs;\n            return { id, kind: resolved.kind, target: resolved.target, mtime };\n        }).sort((a, b) => b.mtime - a.mtime);\n        const limit = Number.isInteger(args.limit) && args.limit > 0 ? args.limit : 100;\n        return rows.slice(0, limit).map((r, i) => ({\n            Index: i + 1,\n            'Workspace Id': r.id,\n            Kind: r.kind,\n            Target: (r.target || '').slice(0, 120),\n            Modified: new Date(r.mtime).toISOString().replace('T', ' ').slice(0, 19),\n            Id: '',\n            Version: '',\n            Source: '',","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/trae-solo/workspaces-fs.js#L28-L64","documentation":"This EmptyResultError is thrown by the workspaces-list command when workspaceStorage exists but contains no subdirectories to list. The directory filter keeps only directories; if none remain the command reports an empty result instead of a hard error.","triggerScenarios":"workspaceStorage folder exists (possibly recreated empty by Trae) but no workspace was ever opened; all workspace directories were deleted by cleanup; only files (not directories) present in the folder.","commonSituations":"Trae freshly installed or reinstalled with an empty storage root; a cache cleaner removed workspace directories; inspecting a backup copy where only the top-level folder was preserved.","solutions":["Open a workspace in Trae SOLO so its storage entry is created, then retry","Confirm with `ls -la <workspaceStorage>` that there really are no workspace directories","Restore deleted workspace entries from backup or accept the empty state","Point TRAE_WORKSPACE_STORAGE at the storage root of the Trae profile actually in use"],"exampleFix":"// before\nif (!dirs.length) {\n    throw new EmptyResultError('trae-solo workspaces-list', 'No workspace storage entries.');\n}\n// after\nif (!dirs.length) {\n    return [];  // empty storage is normal on fresh installs\n}","handlingStrategy":"try-catch","validationCode":"const dirs = fs.existsSync(TRAE_WORKSPACE_STORAGE)\n    ? fs.readdirSync(TRAE_WORKSPACE_STORAGE).filter((n) =>\n        fs.statSync(path.join(TRAE_WORKSPACE_STORAGE, n)).isDirectory())\n    : [];\nif (!dirs.length) console.warn('workspaceStorage has no workspace directories yet.');","typeGuard":null,"tryCatchPattern":"try {\n    const rows = await runWorkspacesList();\n} catch (e) {\n    if (/No workspace storage entries/.test(e.message)) {\n        return []; // empty is normal on fresh installs\n    }\n    throw e;\n}","preventionTips":["Open a workspace in Trae SOLO before running workspaces-list","Treat empty storage as an expected state on fresh installs","Avoid cleanup scripts that remove workspaceStorage subdirectories","Verify the storage root path matches the active Trae profile"],"tags":["empty-result","filesystem"],"backgroundTag":"empty-directory","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}