openai/codex · error · Error
Codex config override keys must be non-empty strings
Error message
Codex config override keys must be non-empty strings
What it means
While flattening config overrides, an object key was an empty string. Empty keys cannot form valid dotted TOML override paths, so the offending entry is rejected.
Solutions
- Use non-empty string keys for every config override entry.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sdk/typescript/src/exec.ts:293 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/21f382e255260c0b.
Report an issue: GitHub.
Appendix: source
Thrown at sdk/typescript/src/exec.ts:293
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) {
continue;
}
const path = prefix ? `${prefix}.${key}` : key;
if (isPlainObject(child)) {
flattenConfigOverrides(child, path, overrides);
} else {
overrides.push(`${path}=${toTomlValue(child, path)}`);
}
}
}
function toTomlValue(value: CodexConfigValue, path: string): string {
if (typeof value === "string") {
return JSON.stringify(value);
} else if (typeof value === "number") {
if (!Number.isFinite(value)) {View on GitHub (pinned to 339751715c)