{"record":{"id":"96f0dcddfeacaf6a","repo":"openai/codex","slug":"agents-role-name-config-file-must-point-to-an-ex","errorCode":null,"errorMessage":"agents.{role_name}.config_file must point to an existing file at {}: {e}","messagePattern":"agents\\.(.+?)\\.config_file must point to an existing file at (.+?): (.+?)","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/agent_roles.rs","lineNumber":405,"sourceCode":"async 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    };\n\n    let config_file_uri = PathUri::from_abs_path(config_file);\n    let metadata = fs\n        .get_metadata(\n            &config_file_uri,\n            GetMetadataOptions::default(),\n            /*sandbox*/ None,\n        )\n        .await\n        .map_err(|e| {\n            std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\n                    \"agents.{role_name}.config_file must point to an existing file at {}: {e}\",\n                    config_file.as_path().display()\n                ),\n            )\n        })?;\n    if metadata.is_file {\n        Ok(())\n    } else {\n        Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            format!(\n                \"agents.{role_name}.config_file must point to a file: {}\",\n                config_file.as_path().display()\n            ),\n        ))\n    }","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/agent_roles.rs#L387-L423","documentation":"Error \"agents.{role_name}.config_file must point to an existing file at {}: {e}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/agent_roles.rs:405 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point `agents.{role_name}.config_file` at an existing 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"}