mirror of
https://github.com/openai/codex.git
synced 2026-10-21 05:22:21 +00:00
Use the step context for command approval prefix rules (#37641)
## What changed Read `allow_prefix_rules` from the turn attached to the active step context when selecting the exec policy and constructing unified exec approval requests. GitOrigin-RevId: d2d26e88b9cefa28bb2df5b9f71aa7b30b7ea331
This commit is contained in:
@@ -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(),
|
||||
));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user