Compare commits

..

1 Commits

Author SHA1 Message Date
Tiffany Citra
980778f529 Fix sandbox retry approvals 2025-10-15 17:04:10 -07:00

View File

@@ -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 preapproved 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,