You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Responses agentic loop can detect an MCP call that requires approval, but the approval lifecycle is not complete:
openai_mcp_dispatch appends an mcp_approval_request item to ResponsesState::accumulated_output during response processing, after agentic_loop has already finalized the client response body. The approval item can therefore be absent from the returned response.
No request path recognizes an OpenAI mcp_approval_response input item, correlates it to the pending approval request, and resumes the original MCP call.
The existing #558 covers argument double-encoding inside an approval request, but not visibility or resumption.
Scope
Return the generated mcp_approval_request in the non-streaming Responses output before ending the loop.
Parse mcp_approval_response input items and correlate approval_request_id with the pending call.
On approval, execute the original MCP call exactly once and resume inference with its result.
On denial, do not call the MCP server and return a Responses-compatible outcome preserving the denial reason when supplied.
Reject unknown, stale, duplicated, or mismatched approval identifiers safely.
Preserve the original tool name, server label, call ID, and arguments across the round trip.
Parent
Part of #26 and #93.
Problem
The Responses agentic loop can detect an MCP call that requires approval, but the approval lifecycle is not complete:
openai_mcp_dispatchappends anmcp_approval_requestitem toResponsesState::accumulated_outputduring response processing, afteragentic_loophas already finalized the client response body. The approval item can therefore be absent from the returned response.mcp_approval_responseinput item, correlates it to the pending approval request, and resumes the original MCP call.The existing #558 covers argument double-encoding inside an approval request, but not visibility or resumption.
Scope
mcp_approval_requestin the non-streaming Responses output before ending the loop.mcp_approval_responseinput items and correlateapproval_request_idwith the pending call.Acceptance criteria
mcp_approval_requestoutput item.mcp_approval_responseperforms onetools/calland completes the model → tool → model loop.tools/callrequests.Related