jackwener/OpenCLI · error · EmptyResultError
Session not found: ${uid}
Error message
Session not found: ${uid} What it means
The `manus read` command calls `session.v1.SessionService/ListSessions` (first page, pageSize 100) and then searches the returned array for a session whose `uid` matches the argument. If no session matches, it throws this EmptyResultError rather than returning empty output. It is a lookup miss, not an API failure — the request succeeded but the target session was not in the returned list.
Source
Thrown at clis/manus/read.js:49
func: async (page, kwargs) => {
const uid = String(kwargs?.uid || '').trim();
if (!uid) throw new ArgumentError('uid', 'must be a non-empty session UID');
await ensureOnManus(page);
const data = requireObject(await page.evaluate(`(async () => {
${MANUS_API_CALL_JS}
return callManusAPI('session.v1.SessionService/ListSessions', {
page: 1,
pageSize: 100,
});
})()`), 'read session');
const sessions = requireArray(data.sessions, 'read session');
const session = sessions.find((s) => s.uid === uid);
if (!session) {
throw new EmptyResultError('manus read', `Session not found: ${uid}`);
}
return [
{ Field: 'UID', Value: session.uid || '—' },
{ Field: 'Title', Value: session.title || '—' },
{ Field: 'Status', Value: session.status || '—' },
{ Field: 'Mode', Value: session.agentTaskMode ?? '—' },
{ Field: 'Credits', Value: session.costedCredits ?? 0 },
{ Field: 'Created', Value: formatTime(session.createdAt) },
{ Field: 'Updated', Value: formatTime(session.updatedAt) },
{ Field: 'Last Display Message', Value: session.lastDisplayMessage || '—' },
];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Run `manus list` and confirm the exact uid you meant; copy it verbatim.
- Verify the browser profile the CLI uses is authenticated as the account that owns the session (re-login if needed).
- Check the session wasn't deleted or archived in the Manus UI.
- If the account has more than 100 sessions, the first-page ListSessions lookup may miss it — use the session directly from `manus list` output or reduce the count.
Example fix
// before (guessed/stale uid) $ manus read sess_OLD123 // EmptyResultError: Session not found: sess_OLD123 // after (uid taken from list output) $ manus list $ manus read sess_01J8ZK3M9A
Defensive patterns
Strategy: try-catch
Validate before calling
const sessions = JSON.parse(run('manus list --json'));
if (!sessions.some(s => s.uid === targetUid)) {
throw new Error(`Unknown session uid: ${targetUid} — run 'manus list' for valid uids`);
} Type guard
const isKnownSession = (uid, sessions) => Array.isArray(sessions) && sessions.some(s => s && s.uid === uid);
Try / catch
try {
const rows = await run('manus read', uid);
} catch (e) {
if (e instanceof EmptyResultError) {
console.error(`Session ${uid} not found; fetch a valid uid via 'manus list'.`);
} else throw e;
} Prevention
- Always source uids from fresh `manus list` output instead of stale references.
- Copy uids verbatim — beware truncation or whitespace when copying from URLs/terminals.
- Confirm the CLI's browser profile is authenticated as the account that owns the session.
- Remember deleted/archived sessions won't appear in ListSessions.
When it happens
Trigger: Passing a uid that does not exist, was deleted/archived so it no longer appears in ListSessions, is not owned by the currently authenticated account, or is a typo; also when the session exists but falls beyond page 1's 100 sessions and the helper only queries the first page.
Common situations: Re-reading a session from a stale reference after it was deleted; running on a browser profile logged into a different Manus account than the one that created the session; truncated or mangled uid copied from a URL; account with >100 sessions.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- No sidebar conversation matched "${raw}". Try the exact id f
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
- bilibili creator-stats ${bvid}
- Chess.com returned 404 for ${url}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/534fce193d28c136.
Report an issue: GitHub.