{"record":{"id":"c48675c4c389185f","repo":"openai/codex","slug":"32603","errorCode":"-32603","errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"exception","errorClass":"ReadEnvironmentConfigError","httpStatus":null,"severity":"error","filePath":"codex-rs/exec-server/src/environment_config.rs","lineNumber":28,"sourceCode":"use codex_config::host_name;\nuse codex_config::loader::LocalTomlLayerStack;\nuse codex_config::loader::load_local_config_layers;\nuse codex_exec_server_protocol::EnvironmentConfigLayer;\nuse codex_exec_server_protocol::EnvironmentConfigLayerStack;\nuse codex_exec_server_protocol::EnvironmentConfigReadParams;\nuse codex_exec_server_protocol::EnvironmentConfigReadResponse;\nuse codex_file_system::ExecutorFileSystem;\nuse codex_utils_home_dir::find_codex_home;\nuse codex_utils_path_uri::PathUri;\n\nuse crate::Environment;\nuse crate::ExecServerError;\n\n#[derive(Debug, thiserror::Error)]\npub(crate) enum ReadEnvironmentConfigError {\n    #[error(\"{0}\")]\n    InvalidParams(String),\n    #[error(\"{0}\")]\n    Internal(String),\n}\n\npub(crate) async fn read_environment_config(\n    file_system: &dyn ExecutorFileSystem,\n    params: EnvironmentConfigReadParams,\n) -> Result<EnvironmentConfigReadResponse, ReadEnvironmentConfigError> {\n    validate_paths(&params)?;\n    let cwd = params\n        .cwd\n        .to_abs_path()\n        .map_err(|error| ReadEnvironmentConfigError::InvalidParams(error.to_string()))?;\n    let codex_home = find_codex_home().map_err(|error| {\n        ReadEnvironmentConfigError::Internal(format!(\"failed to find Codex home: {error}\"))\n    })?;\n    let layers = load_local_config_layers(file_system, codex_home.as_path(), &cwd)\n        .await\n        .map_err(|error| {","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec-server/src/environment_config.rs#L10-L46","documentation":"Error \"{0}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/exec-server/src/environment_config.rs:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the environment configuration value reported in the message."],"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"}