{"record":{"id":"8428b7e3bfbe27a5","repo":"openai/codex","slug":"codex-config-overrides-must-be-a-plain-object","errorCode":null,"errorMessage":"Codex config overrides must be a plain object","messagePattern":"Codex config overrides must be a plain object","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdk/typescript/src/exec.ts","lineNumber":277,"sourceCode":"}\n\nfunction serializeConfigOverrides(configOverrides: CodexConfigObject): string[] {\n  const overrides: string[] = [];\n  flattenConfigOverrides(configOverrides, \"\", overrides);\n  return overrides;\n}\n\nfunction flattenConfigOverrides(\n  value: CodexConfigValue,\n  prefix: string,\n  overrides: string[],\n): void {\n  if (!isPlainObject(value)) {\n    if (prefix) {\n      overrides.push(`${prefix}=${toTomlValue(value, prefix)}`);\n      return;\n    } else {\n      throw new Error(\"Codex config overrides must be a plain object\");\n    }\n  }\n\n  const entries = Object.entries(value);\n  if (!prefix && entries.length === 0) {\n    return;\n  }\n\n  if (prefix && entries.length === 0) {\n    overrides.push(`${prefix}={}`);\n    return;\n  }\n\n  for (const [key, child] of entries) {\n    if (!key) {\n      throw new Error(\"Codex config override keys must be non-empty strings\");\n    }\n    if (child === undefined) {","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/sdk/typescript/src/exec.ts#L259-L295","documentation":"Error \"Codex config overrides must be a plain object\" thrown in openai/codex.","triggerScenarios":"Thrown at sdk/typescript/src/exec.ts:277 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass config overrides as a plain object rather than an array, class instance, or primitive."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}