{"record":{"id":"c9ae9948ff2cacc5","repo":"can1357/oh-my-pi","slug":"unknown-codex-security-cloud-configuration-conf","errorCode":null,"errorMessage":"Unknown Codex Security cloud configuration: ${configurationId}","messagePattern":"Unknown Codex Security cloud configuration: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/security/cloud.ts","lineNumber":262,"sourceCode":"\t\tconst configurations: CodexSecurityCloudConfiguration[] = [];\n\t\tlet cursor: string | undefined;\n\t\tdo {\n\t\t\tconst page = await this.listConfigurations({ limit: 500, cursor, signal });\n\t\t\tconfigurations.push(...page.items);\n\t\t\tcursor = page.nextCursor;\n\t\t} while (cursor);\n\t\treturn configurations;\n\t}\n\n\tasync getConfiguration(configurationId: string, signal?: AbortSignal): Promise<CodexSecurityCloudConfiguration> {\n\t\tlet cursor: string | undefined;\n\t\tdo {\n\t\t\tconst page = await this.listConfigurations({ limit: 500, cursor, signal });\n\t\t\tconst found = page.items.find(item => item.id === configurationId || item.sourceId === configurationId);\n\t\t\tif (found) return found;\n\t\t\tcursor = page.nextCursor;\n\t\t} while (cursor);\n\t\tthrow new Error(`Unknown Codex Security cloud configuration: ${configurationId}`);\n\t}\n\n\tasync startScan(input: StartCodexSecurityCloudScanInput): Promise<CodexSecurityCloudConfiguration> {\n\t\tif (\n\t\t\tinput.lookbackDays !== undefined &&\n\t\t\tinput.lookbackDays !== \"all\" &&\n\t\t\t(!Number.isInteger(input.lookbackDays) || input.lookbackDays < 1)\n\t\t) {\n\t\t\tthrow new Error(\"lookbackDays must be a positive integer or 'all'\");\n\t\t}\n\t\tconst raw = await this.#request(\"scan_configurations\", {\n\t\t\tmethod: \"POST\",\n\t\t\tsignal: input.signal,\n\t\t\tbody: accessToken => {\n\t\t\t\tconst scanInput: JsonObject = {\n\t\t\t\t\tenvironment_id: input.environmentId,\n\t\t\t\t\tlookback_days: input.lookbackDays === \"all\" ? null : (input.lookbackDays ?? 30),\n\t\t\t\t\tnotification_rules: [],","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/security/cloud.ts#L244-L280","documentation":"getConfiguration() pages through all cloud scan configurations (500 per page) and throws this error if no item's id or sourceId equals the requested configurationId. The identifier exists locally but not in the cloud's current configuration list.","triggerScenarios":"Calling getConfiguration(configurationId) with an id from an old/deleted configuration, a sourceId that no longer matches, a typo'd/truncated id, or after the configuration was deleted in the cloud UI.","commonSituations":"Cached configuration ids from previous sessions; configurations deleted or re-created (new id) server-side; scanning with a sourceId from a different cloud tenant/account.","solutions":["Call listConfigurations() and pick a currently-existing id/sourceId","Re-create the scan configuration in the cloud and use its new id","Verify you are authenticated against the same cloud account/tenant that owns the configuration","Check the id for typos/truncation"],"exampleFix":"// before\nconst config = await client.getConfiguration(\"cfg_old_deleted\");\n// after\nconst page = await client.listConfigurations({ limit: 500 });\nconst config = await client.getConfiguration(page.items[0].id); // a live id","handlingStrategy":"try-catch","validationCode":"const page = await client.listConfigurations({ limit: 500 });\nif (!page.items.some(i => i.id === id || i.sourceId === id)) {\n  throw new Error(`Configuration ${id} not found in cloud`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const config = await client.getConfiguration(configurationId);\n} catch (err) {\n  if (err.message.startsWith(\"Unknown Codex Security cloud configuration\")) {\n    const page = await client.listConfigurations({ limit: 500 });\n    // fall back to first available config or prompt re-selection\n  } else throw err;\n}","preventionTips":["Refresh stored configuration ids from the cloud before each scan","Handle configuration deletion server-side as a normal case","Confirm same tenant/account when ids come from another environment"],"tags":["not-found","api-response","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}