{"record":{"id":"9c4da45cc629499d","repo":"openai/codex","slug":"agent-role-file-at-must-define-developer-instr","errorCode":null,"errorMessage":"agent role file at {} must define `developer_instructions`","messagePattern":"agent role file at (.+?) must define `developer_instructions`","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/agent_roles.rs","lineNumber":376,"sourceCode":"        ))\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            ),\n        )),\n        Some(_) => Ok(()),\n        None if require_present => Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            format!(\n                \"agent role file at {} must define `developer_instructions`\",\n                role_file_label.display()\n            ),\n        )),\n        None => Ok(()),\n    }\n}\n\nasync fn validate_agent_role_config_file(\n    fs: &dyn ExecutorFileSystem,\n    role_name: &str,\n    config_file: Option<&AbsolutePathBuf>,\n) -> std::io::Result<()> {\n    let Some(config_file) = config_file else {\n        return Ok(());\n    };","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/agent_roles.rs#L358-L394","documentation":"Error \"agent role file at {} must define `developer_instructions`\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/agent_roles.rs:376 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a `developer_instructions` field to the agent role file."],"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"}