mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
feat: flip the sense of the --sandbox option
This commit is contained in:
@@ -861,7 +861,7 @@ async fn handle_function_call(
|
||||
assess_command_safety(
|
||||
¶ms.command,
|
||||
sess.approval_policy,
|
||||
sess.sandbox_policy,
|
||||
&sess.sandbox_policy,
|
||||
&state.approved_commands,
|
||||
)
|
||||
};
|
||||
@@ -916,14 +916,11 @@ async fn handle_function_call(
|
||||
)
|
||||
.await;
|
||||
|
||||
let roots_snapshot = { sess.writable_roots.lock().unwrap().clone() };
|
||||
|
||||
let output_result = process_exec_tool_call(
|
||||
params.clone(),
|
||||
sandbox_type,
|
||||
&roots_snapshot,
|
||||
sess.ctrl_c.clone(),
|
||||
sess.sandbox_policy,
|
||||
&sess.sandbox_policy,
|
||||
)
|
||||
.await;
|
||||
|
||||
@@ -1006,16 +1003,13 @@ async fn handle_function_call(
|
||||
)
|
||||
.await;
|
||||
|
||||
let retry_roots = { sess.writable_roots.lock().unwrap().clone() };
|
||||
|
||||
// This is an escalated retry; the policy will not be
|
||||
// examined and the sandbox has been set to `None`.
|
||||
let retry_output_result = process_exec_tool_call(
|
||||
params.clone(),
|
||||
SandboxType::None,
|
||||
&retry_roots,
|
||||
sess.ctrl_c.clone(),
|
||||
sess.sandbox_policy,
|
||||
&sess.sandbox_policy,
|
||||
)
|
||||
.await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user