{"record":{"id":"c4952f896a3127d3","repo":"jackwener/OpenCLI","slug":"no-sessions-found","errorCode":null,"errorMessage":"No sessions found.","messagePattern":"No sessions found\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"info","filePath":"clis/manus/list.js","lineNumber":54,"sourceCode":"        const limit = validatedLimit(kwargs?.limit, 20, 200);\n        const includeArchived = kwargs?.archived === true;\n        await ensureOnManus(page);\n\n        const data = requireObject(await page.evaluate(`(async () => {\n            ${MANUS_API_CALL_JS}\n            return callManusAPI('session.v1.SessionService/ListSessions', {\n                page: 1,\n                pageSize: ${limit},\n            });\n        })()`), 'list sessions');\n\n        let sessions = requireArray(data.sessions, 'list sessions');\n        if (!includeArchived) {\n            sessions = sessions.filter((s) => !s.isArchived);\n        }\n\n        if (!sessions.length) {\n            throw new EmptyResultError('manus list', 'No sessions found.');\n        }\n\n        return sessions.slice(0, limit).map((s, index) => ({\n            id: requireString(s?.uid, `list session ${index + 1}`),\n            Title: (s.title || '—').slice(0, 80),\n            Status: shortStatus(s.status),\n            'Last Message': (s.lastDisplayMessage || '—').slice(0, 80),\n            'Last Updated': formatTime(s.updatedAt),\n            Credits: String(s.costedCredits ?? '0'),\n        }));\n    },\n});\n","sourceCodeStart":36,"sourceCodeEnd":67,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/manus/list.js#L36-L67","documentation":"The manus list command fetches sessions via the Manus API and throws EmptyResultError when, after optionally filtering out archived sessions, the resulting array is empty. The API call succeeded; the account simply has no sessions matching the filter.","triggerScenarios":"Running `manus list` on an account with no sessions at all, or running it without the includeArchived flag when every existing session is archived (the isArchived filter empties the array).","commonSituations":"New Manus account with no tasks/sessions created yet; all previous sessions were archived so the default (non-archived) view is empty; querying the wrong account/workspace; a Manus change moved sessions under a different key so the filter runs against a different array.","solutions":["Create a session/task in the Manus web UI, then rerun the command","Pass the include-archived flag/option so archived sessions are not filtered out and rerun","Verify you are signed into the expected account (check user_id via the auth command)","If sessions exist but the error persists, inspect the ListSessions RPC response to confirm the `sessions` key still holds the array"],"exampleFix":"// before\nif (!includeArchived) {\n    sessions = sessions.filter((s) => !s.isArchived);\n}\n// after (caller avoids the throw by requesting archived sessions too)\nconst sessions = await manusList({ includeArchived: true });","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const sessions = await manusList({});\n} catch (e) {\n  if (e instanceof EmptyResultError) {\n    return []; // no (non-archived) sessions — normal state\n  }\n  throw e;\n}","preventionTips":["Pass includeArchived when you suspect all sessions may be archived","Handle EmptyResultError as an expected outcome for new accounts","Verify the authenticated user before diagnosing empty lists as bugs","Catch EmptyResultError before broader error types so empty results don't trigger retries"],"tags":["empty-result","sessions","filtering"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}