fix: release session ID when not used (#7592)

This commit is contained in:
jif-oai authored and GitHub committed 2025-12-04 17:42:16 +00:00
1 parent 1b2509f05a
commit 36edb412b1
2 files changed
+17 -1

No files matched your search

@@ -146,6 +146,7 @@ impl ToolHandler for UnifiedExecHandler {
codex_protocol::protocol::AskForApproval::OnRequest
)
{
manager.release_process_id(&process_id).await;
return Err(FunctionCallError::RespondToModel(format!(
"approval policy is {policy:?}; reject command — you cannot ask for escalated permissions if the approval policy is {policy:?}",
policy = context.turn.approval_policy
@@ -169,6 +170,7 @@ impl ToolHandler for UnifiedExecHandler {
)
.await?
{
manager.release_process_id(&process_id).await;
return Ok(output);
}