{"record":{"id":"85422e9b7c36ebfd","repo":"diegosouzapw/OmniRoute","slug":"reauth-required-85422e","errorCode":"reauth_required","errorMessage":"Codex connection is missing id_token. Re-authenticate this account before exporting.","messagePattern":"Codex connection is missing id_token\\. Re-authenticate this account before exporting\\.","errorType":"exception","errorClass":"CodexAuthFileError","httpStatus":409,"severity":"error","filePath":"src/lib/oauth/utils/codexAuthFile.ts","lineNumber":154,"sourceCode":"function sanitizeFileNamePart(value: string): string {\n  // Keep alphanumerics, dot, underscore, hyphen and @ so email addresses survive\n  // intact in the exported filename (e.g. `auth-diego@example.com.json`).\n  const normalized = value\n    .trim()\n    .toLowerCase()\n    .replace(/[^a-z0-9._@-]+/g, \"-\")\n    .replace(/^-+|-+$/g, \"\");\n\n  return normalized || \"account\";\n}\n\nfunction buildCodexAuthPayload(connection: CodexConnectionLike): CodexAuthFilePayload {\n  const idToken = toNonEmptyString(connection.idToken);\n  const accessToken = toNonEmptyString(connection.accessToken);\n  const refreshToken = toNonEmptyString(connection.refreshToken);\n\n  if (!idToken) {\n    throw new CodexAuthFileError(\n      \"Codex connection is missing id_token. Re-authenticate this account before exporting.\",\n      409,\n      \"reauth_required\"\n    );\n  }\n\n  if (!accessToken) {\n    throw new CodexAuthFileError(\n      \"Codex connection is missing access_token. Refresh or re-authenticate this account first.\",\n      409,\n      \"access_token_missing\"\n    );\n  }\n\n  if (!refreshToken) {\n    throw new CodexAuthFileError(\n      \"Codex connection is missing refresh_token. Re-authenticate this account before exporting.\",\n      409,","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/utils/codexAuthFile.ts#L136-L172","documentation":"Error \"Codex connection is missing id_token. Re-authenticate this account before exporting.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/utils/codexAuthFile.ts:154 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"}