openai/codex · error · std::io::Error
must contain at least one name
Error message
{field_label} must contain at least one name What it means
normalize_agent_role_nickname_candidates received a `nickname_candidates` array that is empty. Declaring the field with zero entries is treated as a configuration mistake — either omit it or provide at least one name.
Solutions
- Add at least one name to {field_label}.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/core/src/config/agent_roles.rs:435 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/356187142116d8f5.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/core/src/config/agent_roles.rs:435
std::io::ErrorKind::InvalidInput,
format!(
"agents.{role_name}.config_file must point to a file: {}",
config_file.as_path().display()
),
))
}
}
fn normalize_agent_role_nickname_candidates(
field_label: &str,
nickname_candidates: Option<&[String]>,
) -> std::io::Result<Option<Vec<String>>> {
let Some(nickname_candidates) = nickname_candidates else {
return Ok(None);
};
if nickname_candidates.is_empty() {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("{field_label} must contain at least one name"),
));
}
let mut normalized_candidates = Vec::with_capacity(nickname_candidates.len());
let mut seen_candidates = BTreeSet::new();
for nickname in nickname_candidates {
let normalized_nickname = nickname.trim();
if normalized_nickname.is_empty() {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("{field_label} cannot contain blank names"),
));
}
if !seen_candidates.insert(normalized_nickname.to_owned()) {View on GitHub (pinned to 339751715c)