Lightweight coding agent that runs in your terminal
Rust
Use the step context for command approval prefix rules (#37641)
sayan-oai420accf199e1
diff --git a/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs b/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rsindex 139d8cd766..acc7ff82ee 100644--- a/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs+++ b/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs@@ -176,7 +176,7 @@ pub(super) async fn try_run_zsh_fork(ctx.session.services.exec_policy- .current_for_prefix_rules(ctx.turn.allow_prefix_rules())+ .current_for_prefix_rules(ctx.step_context.turn.allow_prefix_rules()).as_ref().clone(),));@@ -289,7 +289,7 @@ pub(crate) async fn prepare_unified_exec_zsh_fork(ctx.session.services.exec_policy- .current_for_prefix_rules(ctx.turn.allow_prefix_rules())+ .current_for_prefix_rules(ctx.step_context.turn.allow_prefix_rules()).as_ref().clone(),));diff --git a/codex-rs/core/src/unified_exec/process_manager.rs b/codex-rs/core/src/unified_exec/process_manager.rsindex 82c3cbd4b5..4a4c1ba1c1 100644--- a/codex-rs/core/src/unified_exec/process_manager.rs+++ b/codex-rs/core/src/unified_exec/process_manager.rs@@ -1174,7 +1174,7 @@ impl UnifiedExecProcessManager {request.sandbox_permissions},prefix_rule: request.prefix_rule.clone(),- allow_prefix_rules: context.turn.allow_prefix_rules(),+ allow_prefix_rules: context.step_context.turn.allow_prefix_rules(),}).await;let req = UnifiedExecToolRequest {