From c7a3428986954f4ef03c8beeb0da24aba959d5c9 Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Fri, 31 Oct 2025 17:27:35 -0400 Subject: [PATCH] fix --- codex-rs/core/src/tasks/user_shell.rs | 2 +- codex-rs/core/src/tools/runtimes/shell.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/tasks/user_shell.rs b/codex-rs/core/src/tasks/user_shell.rs index cc48e3def6..0e57e1b728 100644 --- a/codex-rs/core/src/tasks/user_shell.rs +++ b/codex-rs/core/src/tasks/user_shell.rs @@ -82,7 +82,7 @@ impl SessionTask for UserShellCommandTask { command: shell_invocation, workdir: None, timeout_ms: None, - with_escalated_permissions: Some(true), + with_escalated_permissions: None, justification: None, }; diff --git a/codex-rs/core/src/tools/runtimes/shell.rs b/codex-rs/core/src/tools/runtimes/shell.rs index 1e885ca689..8c31526699 100644 --- a/codex-rs/core/src/tools/runtimes/shell.rs +++ b/codex-rs/core/src/tools/runtimes/shell.rs @@ -150,7 +150,7 @@ impl Approvable for ShellRuntime { } fn wants_escalated_first_attempt(&self, req: &ShellRequest) -> bool { - req.with_escalated_permissions.unwrap_or(false) + req.is_user_shell_command || req.with_escalated_permissions.unwrap_or(false) } }