jackwener/OpenCLI · error · CommandExecutionError

HTTP ${probe.httpStatus} from Manus /api/auth/session

Error message

HTTP ${probe.httpStatus} from Manus /api/auth/session

What it means

When the identity probe gets a non-OK, non-auth HTTP status from /api/auth/session (e.g. 500, 502, 504, 429), it returns kind:'http' and this line throws a CommandExecutionError reporting the status code. Unlike AuthRequiredError, this signals a server/network problem rather than missing credentials.

Source

Thrown at clis/manus/auth.js:36

      if (r.status === 401 || r.status === 403) {
        return { kind: 'auth', detail: 'Manus /api/auth/session HTTP ' + r.status };
      }
      if (r.status === 503) {
        return { kind: 'http', httpStatus: 503 };
      }
      if (!r.ok) return { kind: 'http', httpStatus: r.status };
      const d = await r.json();
      const u = d?.user || d;
      if (!u || !(u.id || u.userId)) {
        return { kind: 'auth', detail: 'Manus /api/auth/session 200 but no user' };
      }
      return { ok: true, user_id: String(u.id || u.userId), name: String(u.name || u.displayName || '') };
    } catch (e) {
      return { kind: 'exception', detail: String(e && e.message || e) };
    }
  })()`);
  if (probe?.kind === 'auth') throw new AuthRequiredError('manus.im', probe.detail);
  if (probe?.kind === 'http') throw new CommandExecutionError(`HTTP ${probe.httpStatus} from Manus /api/auth/session`);
  if (probe?.kind === 'exception') throw new CommandExecutionError(`Manus whoami failed: ${probe.detail}`);
  if (!probe?.ok) throw new CommandExecutionError(`Unexpected Manus probe: ${JSON.stringify(probe)}`);
  return { user_id: probe.user_id, name: probe.name };
}

registerSiteAuthCommands({
  site: 'manus',
  domain: 'manus.im',
  loginUrl: 'https://manus.im/login',
  columns: ['user_id', 'name'],
  verify: verifyManusIdentity,
  poll: async (page) => {
    if (!await hasManusSessionCookie(page)) {
      throw new AuthRequiredError('manus.im', 'Waiting for Manus session cookies');
    }
    return verifyManusIdentity(page);
  },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Wait a few minutes and retry — most 5xx are transient server-side outages.
  2. Check Manus status/announcements for an ongoing incident.
  3. If 429, back off and reduce polling frequency of auth checks.
  4. Test https://manus.im in a normal browser to see if the site itself is up.
  5. If behind a corporate proxy/firewall, verify it isn't intercepting or blocking manus.im API calls.

Example fix

// before: tight poll loop trips rate limiting
for (;;) { await verifyManusIdentity(page); }
// after: back off on HTTP errors
for (;;) {
  try { return await verifyManusIdentity(page); }
  catch (e) { if (!/HTTP \d+ from Manus/.test(e.message)) throw e; await sleep(30000); }
}
Defensive patterns

Strategy: retry

Validate before calling

// pre-flight: is manus.im reachable?
const res = await fetch('https://manus.im/').catch(() => null);
if (!res || !res.ok) throw new Error('manus.im unreachable — retry later');

Type guard

function isServerError(probe) { return probe?.kind === 'http' && probe.httpStatus >= 500; }

Try / catch

const retry = async (fn, n = 3) => {
  for (let i = 0; i < n; i++) {
    try { return await fn(); }
    catch (e) {
      if (/HTTP \d+ from Manus \/api\/auth\/session/.test(e.message) && i < n - 1) {
        await new Promise(r => setTimeout(r, 5000 * (i + 1))); continue;
      }
      throw e;
    }
  }
};

Prevention

When it happens

Trigger: Manus's /api/auth/session returns 5xx during outages or deployments, 429 under rate limiting, or any other non-2xx/non-401/non-403/non-503 status; occurs during manus whoami/auth verify or any command that calls verifyManusIdentity (including the login poll).

Common situations: Manus server incident or maintenance window; rate limiting from too-frequent CLI polling; corporate proxy/WAF intercepting requests; transient network errors between browser and manus.im.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/d909421daa1d4123. Report an issue: GitHub.