Python: fix(ag-ui): persist workflow HITL user text in thread snapshots - #8273
LI (ktz03) wants to merge 5 commits into
Conversation
When resume carries user replies only in interrupt.value with messages:[], seed the snapshot builder with those turns so hydrate keeps them (microsoft#8160).
There was a problem hiding this comment.
🟡 Changes recommended
Resume synthesis can persist approval strings and duplicate user turns.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Persists workflow HITL resume text in AG-UI thread snapshots for correct hydration.
Changes:
- Converts conversational resume values into snapshot messages.
- Adds regression coverage for message-list resumes.
File summaries
| File | Description |
|---|---|
_workflow.py |
Adds resume-value snapshot synthesis. |
test_workflow_agent.py |
Tests HITL text persistence. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Fork CI for this PR may need a maintainer to Approve workflows before Python tests run (same as other community PRs). Happy to address review feedback once checks appear. |
Address Copilot review on microsoft#8273: do not hydrate bare approved/rejected resume strings as user messages, and avoid duplicating turns already present in request messages.
|
Follow-up for Copilot review: skip bare approval/rejection resume strings as user turns, and dedupe resume-synthesized snapshot messages against incoming |
|
Checks look good. Persisting the HITL user text from If anything is still blocking review on #8160, happy to dig in. |
- Hashable multimodal content identity for resume dedupe - Project only user turns from resume payloads - Skip approvals via pending request type/data, not response text - Count-aware role/content fallback when message IDs differ
- Hashable multimodal content identity for resume dedupe - Project only user turns from resume payloads - Skip approvals via pending request type/data, not response text - Count-aware role/content fallback when message IDs differ
|
Thanks for the update. Before this is ready, could you please:
Once those are addressed, please re-request review. Thanks! |
|
Eduard van Valkenburg (@eavanvalkenburg) Updated PR body to the repository template and addressed the latest review feedback on this head — please re-review when convenient. |
|
Thanks for updating the PR body. The remaining blocker is that this branch now conflicts with |
Replay conversational HITL resume turns into the thread snapshot while preserving main's reasoning capture and overlap-merge resume path.
|
Addressed on Workflow runs for this head are currently waiting on approval-gated Actions. |
Motivation & Context
AG-UI workflow HITL resumes often put the user reply in
resume.interrupts[].valuewithmessages: []. Without projecting that text into the Thread Snapshot, hydrate loses the conversational turn after resume (#8160).Description & Review Guide
userturns from resume payloads.request_info(str)answers like "approved" are no longer dropped._snapshot_messages_from_resume_value/_append_unique_snapshot_messagesinagent_framework_ag_ui/_workflow.pyand the unit tests intest_workflow_agent.py.Related Issue
Fixes #8160
No other open PR targets this issue.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.