Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: read-only escalations (#3673)

Dylana8026d384648
diff --git a/codex-rs/core/src/openai_tools.rs b/codex-rs/core/src/openai_tools.rs
index a511d6dd16..f4d724815e 100644
--- a/codex-rs/core/src/openai_tools.rs
+++ b/codex-rs/core/src/openai_tools.rs
@@ -273,7 +273,7 @@ fn create_shell_tool_for_sandbox(sandbox_policy: &SandboxPolicy) -> OpenAiTool {
},
);
- if matches!(sandbox_policy, SandboxPolicy::WorkspaceWrite { .. }) {
+ if !matches!(sandbox_policy, SandboxPolicy::DangerFullAccess) {
properties.insert(
"with_escalated_permissions".to_string(),
JsonSchema::Boolean {