{"record":{"id":"297cbdb5dbd2f8f1","repo":"stablyai/orca","slug":"incompatible-runtime","errorCode":"incompatible_runtime","errorMessage":"The running Orca runtime is too old to add accounts from the CLI. Update or restart Orca and try again.","messagePattern":"The running Orca runtime is too old to add accounts from the CLI\\. Update or restart Orca and try again\\.","errorType":"exception","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/handlers/account.ts","lineNumber":276,"sourceCode":" * silently would target the laptop rather than the host the user named — the exact\n * mistake this feature exists to avoid. A `--help` note does not reach someone who\n * already typed the flag.\n */\nfunction rejectRemoteSelectionFlags(ctx: HandlerContext, command: string): void {\n  for (const flag of ['environment', 'pairing-code']) {\n    if (ctx.flags.has(flag)) {\n      throw new RuntimeClientError(\n        'invalid_argument',\n        `\\`--${flag}\\` does not retarget \\`${command}\\`. Run it on the host whose accounts you want to manage.`\n      )\n    }\n  }\n}\n\nasync function assertAccountImportSupported({ client }: HandlerContext): Promise<void> {\n  const status = await client.call<RuntimeStatus>('status.get')\n  if (!status.result.capabilities?.includes(ACCOUNT_IMPORT_RUNTIME_CAPABILITY)) {\n    throw new RuntimeClientError(\n      'incompatible_runtime',\n      'The running Orca runtime is too old to add accounts from the CLI. Update or restart Orca and try again.'\n    )\n  }\n}\n\n/** CLI handlers for `orca account add [--agent claude|codex]` and `orca account list`. */\nexport const ACCOUNT_HANDLERS: Record<string, CommandHandler> = {\n  'account add': async (ctx) => {\n    const agentFlag = ctx.flags.get('agent')\n    // Why: a valueless `--agent` parses as boolean true; defaulting it to claude\n    // would silently run a full OAuth login for the provider the user did not ask for.\n    if (agentFlag !== undefined && typeof agentFlag !== 'string') {\n      throw new RuntimeClientError(\n        'invalid_argument',\n        'Missing a value for --agent. Use `--agent claude` or `--agent codex`.'\n      )\n    }","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/handlers/account.ts#L258-L294","documentation":"Thrown by assertAccountImportSupported (code 'incompatible_runtime') when the running Orca runtime's status.get response does not advertise the ACCOUNT_IMPORT_RUNTIME_CAPABILITY. The CLI can add accounts only if the runtime it talks to supports account import; an older/older-running runtime lacks the RPC handler and would otherwise fail opaquely deep in the OAuth flow. This check fails fast before the expensive login round trip.","triggerScenarios":"status.get().result.capabilities does not include ACCOUNT_IMPORT_RUNTIME_CAPABILITY — typically because the runtime binary is older than the CLI, or the runtime was not restarted after an update.","commonSituations":"CLI updated but the desktop runtime still running is the previous version; running against a remote/older Orca instance; partial update where only one side rolled forward.","solutions":["Update Orca to a version whose runtime advertises account-import capability.","Restart the Orca runtime (quit and relaunch the app) so the new binary is actually running.","Confirm you are targeting the expected runtime (not an older remote one)."],"exampleFix":"# before: runtime too old\norca account add --agent claude\n\n# after\n# 1. update Orca, 2. restart the app, then:\norca account add --agent claude","handlingStrategy":"validation","validationCode":"async function runtimeSupportsAccountImport(client: RuntimeClient): Promise<boolean> {\n  const status = await client.call<RuntimeStatus>('status.get')\n  return !!status.result.capabilities?.includes(ACCOUNT_IMPORT_RUNTIME_CAPABILITY)\n}","typeGuard":"function hasCapability(status: RuntimeStatus, cap: string): boolean {\n  return !!status.result.capabilities?.includes(cap)\n}","tryCatchPattern":"try {\n  await assertAccountImportSupported(ctx)\n} catch (e) {\n  if (e instanceof RuntimeClientError && e.code === 'incompatible_runtime') {\n    // prompt user to update + restart Orca, then retry\n  }\n  throw e\n}","preventionTips":["Keep CLI and runtime on the same Orca version.","Restart the runtime after updates so the new binary is actually live.","Gate account flows on capability advertisement before starting OAuth."],"tags":["cli","account","runtime","version-skew","incompatible-runtime"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}