{"record":{"id":"600a77af9cc3e30d","repo":"openai/codex","slug":"codex-agents-cannot-apply-local-provider-or-addi","errorCode":null,"errorMessage":"`codex agents` cannot apply local provider or additional-directory overrides to a remote server","messagePattern":"`codex agents` cannot apply local provider or additional-directory overrides to a remote server","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/cli/src/main.rs","lineNumber":1118,"sourceCode":"                if interactive.prompt.is_some() || !interactive.images.is_empty() {\n                    anyhow::bail!(\"`codex agents` does not accept an initial prompt or images\");\n                }\n                if root_remote.is_some()\n                    && (interactive.oss\n                        || interactive.oss_provider.is_some()\n                        || !interactive.add_dir.is_empty()\n                        || interactive\n                            .config_overrides\n                            .parse_overrides()\n                            .map_err(anyhow::Error::msg)?\n                            .iter()\n                            .any(|(key, value)| {\n                                key == \"sandbox_workspace_write.writable_roots\"\n                                    || (key == \"sandbox_workspace_write\"\n                                        && value.get(\"writable_roots\").is_some())\n                            }))\n                {\n                    anyhow::bail!(\n                        \"`codex agents` cannot apply local provider or additional-directory overrides to a remote server\"\n                    );\n                }\n                if is_workload_identity_selected() {\n                    anyhow::bail!(\n                        \"`codex agents` is unavailable while workload identity is active\"\n                    );\n                }\n                if root_remote.is_none() {\n                    resolve_remote_endpoint(\n                        /*remote*/ None,\n                        root_remote_auth_token_env.clone(),\n                    )?;\n                    #[cfg(not(unix))]\n                    anyhow::bail!(\"`codex agents` requires `--remote` on this platform\");\n                }\n                interactive.agents_overview = true;\n            }","sourceCodeStart":1100,"sourceCodeEnd":1136,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/cli/src/main.rs#L1100-L1136","documentation":"Guard for `codex agents` with a remote target: local-only options (--oss/--oss-provider, --add-dir, or config overrides like sandbox_workspace_write.writable_roots) cannot be honored on a remote server, so the combination is rejected.","triggerScenarios":"Thrown at codex-rs/cli/src/main.rs:1118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the local provider/add-dir/config overrides when using --remote","Apply those settings in the remote server's own configuration","Run `codex agents` locally if you need local overrides"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}