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
{{ message }}
Repository navigation
Python: [Feature]: TOOL_CALL_RESULT Events Not Emitted on Approval Resume #4589
When a tool is approved via the interrupt/resume flow, _resolve_approval_responses (line 710) executes the tool and injects the result into the messages array passed to agent.run(). However, no TOOL_CALL_RESULT SSE event is yielded to the client.
Turn 2 (resume with approval): Wrapper executes the tool internally → result injected into messages → LLM continues → only the LLM's text response is streamed
The client sees the tool call (START/ARGS/END) but never the tool result
Impact
UI cannot display tool output. The UI renders tool calls and their outputs, but for approved tools there is no TOOL_CALL_RESULT event to render.
Middleware cannot reconstruct full conversation history. In multi-turn HITL scenarios (Turn 1 interrupts → Turn 2 approves/interrupts → Turn 3 approves), middleware has no record of prior turn tool results, preventing construction of a full messages[] array. Current workaround: only include the most recent turn's messages in each resume request.
Expected behavior
After _resolve_approval_responses executes approved tools (line 710), run_agent_stream should yield a TOOL_CALL_RESULT event for each successfully executed tool before calling agent.run(). The fix goes between line 710 and line 742 — iterate over resolved messages, find function_result contents, and yield corresponding events.
Reproduction
Configure an agent with MCPSpecificApproval on a tool
Send a query that triggers the tool
Resume with {"accepted": true}
Observe SSE stream — no TOOL_CALL_RESULT event appears
changed the title [-][Feature]: TOOL_CALL_RESULT Events Not Emitted on Approval Resume[/-][+]Python: [Feature]: TOOL_CALL_RESULT Events Not Emitted on Approval Resume[/+]on Mar 10, 2026
Activity
[-][Feature]: TOOL_CALL_RESULT Events Not Emitted on Approval Resume[/-][+]Python: [Feature]: TOOL_CALL_RESULT Events Not Emitted on Approval Resume[/+]moonbox3 commentedon Mar 12, 2026
We've fixed this bug. Could you let us know which version of the agent-framework-ag-ui package you're using?
nandireddy19 commentedon Mar 12, 2026
agent-framework-ag-ui = {version = "^1.0.0b260304", allow-prereleases = true}
Emit TOOL_CALL_RESULT events on approval resume (microsoft#4589)
fix(ag-ui): address PR review feedback for microsoft#4589
Fix microsoft#4589: clean up approval resolution and add missing tests
Fix import sorting lint error in test_approval_result_event.py
Python: Emit TOOL_CALL_RESULT events when resuming after tool approval (