{"record":{"id":"7a6cf8ae45c0247b","repo":"diegosouzapw/OmniRoute","slug":"missing-account-id","errorCode":"missing_account_id","errorMessage":"Unable to derive account_id from the auth.json tokens","messagePattern":"Unable to derive account_id from the auth\\.json tokens","errorType":"exception","errorClass":"CodexAuthFileError","httpStatus":400,"severity":"error","filePath":"src/lib/oauth/utils/codexAuthImport.ts","lineNumber":159,"sourceCode":"      \"access_token is missing or empty in the auth.json\",\n      400,\n      \"missing_access_token\"\n    );\n  }\n\n  if (!refreshToken) {\n    throw new CodexAuthFileError(\n      \"refresh_token is missing or empty in the auth.json\",\n      400,\n      \"missing_refresh_token\"\n    );\n  }\n\n  const tokensAccountId = toNonEmptyString(tokens.account_id) ?? undefined;\n  const accountId = extractCodexAccountId(idToken, tokensAccountId);\n\n  if (!accountId) {\n    throw new CodexAuthFileError(\n      \"Unable to derive account_id from the auth.json tokens\",\n      400,\n      \"missing_account_id\"\n    );\n  }\n\n  return {\n    idToken,\n    accessToken,\n    refreshToken,\n    accountId,\n    userId: extractCodexUserId(idToken),\n    email: extractJwtEmail(idToken),\n    expiresAt: extractExpiresAt(accessToken, idToken),\n  };\n}\n\n// ──── Create / update connection ──────────────────────────────────────────────","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/utils/codexAuthImport.ts#L141-L177","documentation":"Error \"Unable to derive account_id from the auth.json tokens\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/utils/codexAuthImport.ts:159 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}