{"record":{"id":"fbc301d74c2d9196","repo":"stablyai/orca","slug":"orca-could-not-verify-the-originating-codex-sessio","errorCode":null,"errorMessage":"Orca could not verify the originating Codex session file, so automatic resume was stopped to avoid using a different account.","messagePattern":"Orca could not verify the originating Codex session file, so automatic resume was stopped to avoid using a different account\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/codex/codex-unverified-resume-launch.ts","lineNumber":32,"sourceCode":" */\nexport function dropUnverifiedCodexResumeArgv(args: {\n  command: string | undefined\n  providerSession: AgentProviderSessionMetadata | null\n  claimedCodexProvenance: boolean\n}): { command: string | undefined; droppedResumeArgv: boolean } {\n  if (!args.command || !args.providerSession) {\n    return { command: args.command, droppedResumeArgv: false }\n  }\n  const drop = dropAgentResumeArgvFromCommand({\n    command: args.command,\n    agent: 'codex',\n    providerSession: args.providerSession\n  })\n  if (drop.status === 'dropped') {\n    return { command: drop.command, droppedResumeArgv: true }\n  }\n  if (drop.status === 'unrecognized' && args.claimedCodexProvenance) {\n    throw new Error(UNVERIFIED_CODEX_RESUME_ERROR)\n  }\n  return { command: args.command, droppedResumeArgv: false }\n}\n","sourceCodeStart":14,"sourceCodeEnd":36,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/codex/codex-unverified-resume-launch.ts#L14-L36","documentation":"Thrown (UNVERIFIED_CODEX_RESUME_ERROR) when dropAgentResumeArgvFromCommand returned status 'unrecognized' AND the session metadata claimed Codex provenance (claimedCodexProvenance). Orca could not strip the resume argv from the launch command, and because the session claims to be a real Codex rollout, launching would risk resuming under whichever account is currently selected — potentially a different account. So it aborts the launch rather than cross accounts.","triggerScenarios":"The resume command's argv structure doesn't match any pattern dropAgentResumeArgvFromCommand knows for codex (e.g., --resume, -c continued-session); providerSession is set and claimedCodexProvenance is true but the resume flag is in an unexpected position/form; a codex CLI change altered the resume flag syntax.","commonSituations":"Codex changed its resume flag syntax in a new release so the drop pattern no longer matches; a custom alias/wrapper rewrites the codex command into an unrecognizable form; the session metadata says codex but the command is a shell pipeline.","solutions":["Update dropAgentResumeArgvFromCommand to recognize the new codex resume flag syntax.","If the account is correct and you want to proceed, ensure the resume argv is in a recognized form (direct codex invocation, not wrapped).","Launch a fresh session instead of resuming to avoid the account-crossing risk.","Verify providerSession and claimedCodexProvenance are set correctly — if the session isn't actually a codex rollout, provenance should be false.","Check the agent-resume-argv-drop shared helper against the current codex CLI argv grammar."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before launching, confirm the resume argv is recognizable so launch doesn't abort:\nconst drop = dropAgentResumeArgvFromCommand({ command, agent: 'codex', providerSession })\nif (drop.status === 'unrecognized' && claimedCodexProvenance) {\n  // choose: launch fresh (drop command) or fix the argv grammar; do not call dropUnverifiedCodexResumeArgv expecting success\n}","typeGuard":null,"tryCatchPattern":"try {\n  const { command: safe } = dropUnverifiedCodexResumeArgv(args)\n  launch(safe)\n} catch (error) {\n  if (error instanceof Error && error.message === UNVERIFIED_CODEX_RESUME_ERROR) {\n    // do NOT launch; surface to user that resume was blocked for account safety\n    // offer a fresh session instead\n  } else throw error\n}","preventionTips":["Keep dropAgentResumeArgvFromCommand's codex argv grammar current with the codex CLI release.","Launch direct codex commands (not wrapped in shell pipelines) so the resume flag is strippable.","Set claimedCodexProvenance accurately — false for non-rollout sessions avoids the throw.","Prefer starting a fresh session over forcing an unverified resume."],"tags":["codex","session-resume","account-safety","argv","launch","provenance"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}