Repository navigation
Python: Fix restored subworkflow sibling requests - #9289
Eduard van Valkenburg (eavanvalkenburg) merged 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
ID-based filtering can incorrectly discard a valid re-prompt that reuses its request ID.
1 open finding
What changed in this PR
Fixes stale sibling requests when restoring checkpointed Python sub-workflows.
Changes:
- Filters previously propagated requests during response handling.
- Adds a fan-out/fan-in checkpoint restoration regression test.
| File | Description |
|---|---|
_workflow_executor.py |
Filters restored pending request events. |
test_sub_workflow.py |
Tests restored sibling-request completion. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (1 commit(s)): 9dfd637226e5
Model: gpt-5.6-sol
Overview
The change snapshots child request IDs before resuming and filters restored sibling events before forwarding the result, with regression coverage for a checkpointed fan-out/fan-in flow. Existing response validation, child-owned pending state, and same-instance run serialization constrain the change well. However, ID-only filtering also removes a genuinely new sequential request when a response handler reuses the completed request's explicit ID, orphaning that continuation.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: python/packages/core/agent_framework/_workflows/_workflow_executor.py
4d54a11 to
b382e74
Compare
Jose Alvarez (jpalvarezl)
left a comment
There was a problem hiding this comment.
The restored cancellation fix now applies the same exact-event suppression as response handling. I verified both bulk sibling cancellation and a repeated partial restore/cancel chain clear the live pending map and persisted checkpoint without leaving the workflow idle with pending requests. The net-new diff and current feedback show no distinct regressions.

Motivation & Context
Restoring a parent checkpoint while answering multiple sibling requests from a propagated sub-workflow could re-register one request that was already being answered. Later checkpoints then retained that stale request, leaving an otherwise completed workflow idle with pending work. This restores checkpoint-resume behavior to match in-place resumes.
Description & Review Guide
WorkflowExecutor._handle_responseand the restored multi-request regression.Related Issue
Closes #9270
AI Assistance
AI assistance details: implementation, regression test, validation, and PR description.
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.