mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
Fix sandbox retry approvals
This commit is contained in:
@@ -982,13 +982,17 @@ async fn handle_function_call(
|
||||
)
|
||||
.await;
|
||||
|
||||
match rx_approve.await.unwrap_or_default() {
|
||||
let decision = rx_approve.await.unwrap_or_default();
|
||||
|
||||
if matches!(decision, ReviewDecision::ApprovedForSession) {
|
||||
// Persist this command as pre-approved for the
|
||||
// remainder of the session so future executions
|
||||
// can skip the sandbox directly.
|
||||
sess.add_approved_command(params.command.clone());
|
||||
}
|
||||
|
||||
match decision {
|
||||
ReviewDecision::Approved | ReviewDecision::ApprovedForSession => {
|
||||
// Persist this command as pre‑approved for the
|
||||
// remainder of the session so future
|
||||
// executions skip the sandbox directly.
|
||||
// TODO(ragona): Isn't this a bug? It always saves the command in an | fork?
|
||||
sess.add_approved_command(params.command.clone());
|
||||
// Inform UI we are retrying without sandbox.
|
||||
sess.notify_background_event(
|
||||
&sub_id,
|
||||
|
||||
Reference in New Issue
Block a user