Repository navigation
Python: Prefer explicit AG-UI resume payloads - #6360
Merged
Evan Mattson (moonbox3) merged 5 commits intoJul 8, 2026
Merged
Evan Mattson (moonbox3) merged 5 commits into
Evan Mattson (moonbox3) merged 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR ensures that explicit resume payload responses take precedence over any responses inferred from incoming messages (e.g., stale function_approvals), and adds a regression test for that behavior.
Changes:
- Add
_merge_workflow_response_sources()to merge resume/message-derived responses with resume taking precedence. - Update
run_workflow_stream()to use the new merge behavior. - Add a test ensuring explicit resume approval responses override stale message approvals.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| python/packages/ag-ui/agent_framework_ag_ui/_workflow_run.py | Merges response sources so explicit resume payloads override message-derived responses. |
| python/packages/ag-ui/tests/ag_ui/test_workflow_run.py | Adds regression test covering precedence of resume interrupts over function_approvals in messages. |
Contributor
Author
|
@microsoft-github-policy-service agree |
Contributor
Author
|
Updated the branch against current
The branch is mergeable again from my side. |
Contributor
|
gezw is there an open issue we can link this PR to? |
Evan Mattson (moonbox3)
approved these changes
Jul 7, 2026
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Giles Odigwe (giles17)
approved these changes
Jul 7, 2026
Contributor
Contributor
|
Please also resolve the conflicted files. Thanks. |
# Conflicts: # python/packages/ag-ui/agent_framework_ag_ui/_workflow_run.py # python/packages/ag-ui/tests/ag_ui/test_workflow_run.py
Evan Mattson (moonbox3)
enabled auto-merge
July 8, 2026 23:03
Giles Odigwe (giles17)
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Details
run_workflow_stream()can receive resume responses from both the explicitresumepayload and from prior AG-UI messages. When both sources contain an entry for the same pending request id, the explicit resume payload should be treated as the caller's current decision and should not be overwritten by stale message history.This change centralizes the merge behavior so message-derived responses are used as a fallback and explicit resume values win on conflicts.
Validation
From
python/:uv run --group dev pytest -q --disable-warnings packages/ag-ui/tests/ag_ui/test_workflow_run.pyuv run --group dev ruff check packages/ag-ui/agent_framework_ag_ui/_workflow_run.py packages/ag-ui/tests/ag_ui/test_workflow_run.pyuv run --group dev ruff format --check packages/ag-ui/agent_framework_ag_ui/_workflow_run.py packages/ag-ui/tests/ag_ui/test_workflow_run.pyuv run --group dev python -m py_compile packages/ag-ui/agent_framework_ag_ui/_workflow_run.py packages/ag-ui/tests/ag_ui/test_workflow_run.pygit diff --check