openai/codex · error · Error
Codex config overrides must be a plain object
Error message
Codex config overrides must be a plain object
What it means
Error "Codex config overrides must be a plain object" thrown in openai/codex.
Source
Thrown at sdk/typescript/src/exec.ts:277
}
function serializeConfigOverrides(configOverrides: CodexConfigObject): string[] {
const overrides: string[] = [];
flattenConfigOverrides(configOverrides, "", overrides);
return overrides;
}
function flattenConfigOverrides(
value: CodexConfigValue,
prefix: string,
overrides: string[],
): void {
if (!isPlainObject(value)) {
if (prefix) {
overrides.push(`${prefix}=${toTomlValue(value, prefix)}`);
return;
} else {
throw new Error("Codex config overrides must be a plain object");
}
}
const entries = Object.entries(value);
if (!prefix && entries.length === 0) {
return;
}
if (prefix && entries.length === 0) {
overrides.push(`${prefix}={}`);
return;
}
for (const [key, child] of entries) {
if (!key) {
throw new Error("Codex config override keys must be non-empty strings");
}
if (child === undefined) {View on GitHub (pinned to 339751715c)
Solutions
- Pass config overrides as a plain object rather than an array, class instance, or primitive.
When it happens
Trigger: Thrown at sdk/typescript/src/exec.ts:277 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/8428b7e3bfbe27a5.
Report an issue: GitHub.