{"record":{"id":"d679626ada295fef","repo":"openai/codex","slug":"agent-role-role-name-must-define-a-description","errorCode":null,"errorMessage":"agent role `{role_name}` must define a description","messagePattern":"agent role `(.+?)` must define a description","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/agent_roles.rs","lineNumber":355,"sourceCode":") -> std::io::Result<Option<String>> {\n    match description.map(str::trim) {\n        Some(\"\") => Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            format!(\"{field_label} cannot be blank\"),\n        )),\n        Some(description) => Ok(Some(description.to_string())),\n        None => Ok(None),\n    }\n}\n\nfn validate_required_agent_role_description(\n    role_name: &str,\n    description: Option<&str>,\n) -> std::io::Result<()> {\n    if description.is_some() {\n        Ok(())\n    } else {\n        Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            format!(\"agent role `{role_name}` must define a description\"),\n        ))\n    }\n}\n\nfn validate_agent_role_file_developer_instructions(\n    role_file_label: &Path,\n    developer_instructions: Option<&str>,\n    require_present: bool,\n) -> std::io::Result<()> {\n    match developer_instructions.map(str::trim) {\n        Some(\"\") => Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            format!(\n                \"agent role file at {}.developer_instructions cannot be blank\",\n                role_file_label.display()\n            ),","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/agent_roles.rs#L337-L373","documentation":"Error \"agent role `{role_name}` must define a description\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/agent_roles.rs:355 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a `description` to agent role `{role_name}`."],"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"}