openai/codex · error
uses a reserved namespace
Error message
{LABEL} uses a reserved namespace: {namespace} What it means
The namespace in {LABEL} collides with a reserved one: literally "mcp", any "mcp__" prefix, or an entry in RESERVED_RESPONSES_NAMESPACES (built-in tool namespaces like web, terminal, functions). User namespaces must not shadow built-in tool routing.
Solutions
- Choose a name for {LABEL} outside the reserved namespace {namespace}.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/core/src/config/mod.rs:3093 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/797fdd560cd0b11b.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/core/src/config/mod.rs:3093
.bytes()
.all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'_' | b'-'))
{
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("{LABEL} must match ^[a-zA-Z0-9_-]+$"),
));
}
if namespace.chars().count() > MAX_LEN {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("{LABEL} must be at most {MAX_LEN} characters"),
));
}
if namespace == "mcp"
|| namespace.starts_with("mcp__")
|| RESERVED_RESPONSES_NAMESPACES.contains(&namespace)
{
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("{LABEL} uses a reserved namespace: {namespace}"),
));
}
Ok(())
}
impl Config {
#[cfg(test)]
async fn load_from_base_config_with_overrides(
cfg: ConfigToml,
overrides: ConfigOverrides,
codex_home: AbsolutePathBuf,
) -> std::io::Result<Self> {
// Note this ignores requirements.toml enforcement for tests.
let config_layer_stack = ConfigLayerStack::default();
Self::load_config_with_layer_stack(View on GitHub (pinned to 339751715c)