Python: Restore runtime tools on nested workflow response resume - #8345
Open
WhaleTech (ryo-whaletech) wants to merge 2 commits into
Open
Python: Restore runtime tools on nested workflow response resume#8345WhaleTech (ryo-whaletech) wants to merge 2 commits into
WhaleTech (ryo-whaletech) wants to merge 2 commits into
Conversation
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 13, 2026 12:16 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 13, 2026 12:16 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 13, 2026 12:17 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 13, 2026 12:17 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
WhaleTech (ryo-whaletech)
September 13, 2026 12:17
View session
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The fix is focused and tested, but it modifies a sensitive approval-resume continuation path requiring core-team review.
Pull request overview
Restores request-scoped runtime tools when resuming nested Python workflows.
Changes:
- Forwards active runtime tools during nested response continuation.
- Adds regression coverage for propagated responses.
File summaries
| File | Description |
|---|---|
python/packages/core/agent_framework/_workflows/_workflow_executor.py |
Propagates runtime tools to resumed child workflows. |
python/packages/core/tests/workflow/test_sub_workflow.py |
Verifies tools reach the child response handler. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Evan Mattson (moonbox3)
marked this pull request as ready for review
September 14, 2026 05:22
Evan Mattson (moonbox3)
deployed
to
github-app-auth
September 14, 2026 05:22 — with
GitHub Actions
Active
Evan Mattson (moonbox3)
approved these changes
Sep 14, 2026
Evan Mattson (moonbox3)
enabled auto-merge
September 14, 2026 05:26
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.
Motivation & Context
A nested
WorkflowExecutorforwards request-scoped runtime tools to its child during initial execution and nested cancellation, but currently omits them when resuming the child from a response.As a result, the resumed child does not receive runtime tools supplied to the current parent continuation, leaving its response handling and subsequent child execution without that request-scoped context.
This restores the response-continuation propagation previously introduced in #7776 and later lost during the nested workflow invocation-kwargs changes in #7963.
Per the repository guidance for approval-resume-related changes, I am opening this as a draft so the concrete regression test and minimal fix are available for review while the core team confirms the intended direction.
Description & Review Guide
What are the major changes?
WorkflowExecutor._handle_response()resumes its child.What is the impact of these changes?
function_invocation_kwargsandclient_kwargscontinuation semantics remain unchanged.What do you want reviewers to focus on?
_handle_response()is the intended restoration of the behavior introduced in Python: Fix AG-UI workflow-as-agent approval resumes #7776.Related Issue
Fixes #8344
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.