Skip to content

Python: Allow checkpoint deserialization for orchestrations - #7626

Open
Ruiming Zhao (uuzzrm) wants to merge 1 commit into
microsoft:mainfrom
uuzzrm:codex/issue-7618-checkpoint-orchestrations
Open

Python: Allow checkpoint deserialization for orchestrations#7626
Ruiming Zhao (uuzzrm) wants to merge 1 commit into
microsoft:mainfrom
uuzzrm:codex/issue-7618-checkpoint-orchestrations

Conversation

@uuzzrm

Copy link
Copy Markdown

Motivation & Context

Restricted checkpoint deserialization currently rejects pending orchestration requests from agent_framework_orchestrations.*. The allowlist only matches the dotted agent_framework. prefix, so workflows that pause for Handoff or Magentic user input cannot be restored through the restricted checkpoint path.

Description & Review Guide

  • What are the major changes? Extend the framework module-prefix allowlist to cover the first-party agent_framework_orchestrations. package and add a focused regression test covering both HandoffAgentUserRequest and MagenticPlanReviewRequest.
  • What is the impact of these changes? Pending Handoff and Magentic requests can round-trip through restricted checkpoint decoding. Custom types and the existing blocked-global checks remain unchanged.
  • What do you want reviewers to focus on? Whether the explicit package-prefix boundary matches the supported first-party orchestration package and whether the regression test exercises the same restricted decode path used by checkpoint storage.

I used an AI coding assistant during the investigation and validation, then reviewed the resulting patch and test coverage manually.

Related Issue

Fixes #7618

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add [BREAKING] to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Signed-off-by: Ruiming Zhao <uuzzrm@gmail.com>
Copilot AI balanced review requested due to automatic review settings August 12, 2026 03:08
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Aug 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends restricted checkpoint decoding to support first-party orchestration request types.

Changes:

  • Allowlists the agent_framework_orchestrations. package prefix.
  • Adds regression coverage for Handoff and Magentic requests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
python/packages/core/agent_framework/_workflows/_checkpoint_encoding.py Expands the restricted-deserialization allowlist.
python/packages/core/tests/workflow/test_checkpoint_orchestrations_deserialization.py Tests orchestration request round-tripping.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

# Module prefixes for framework-internal types that are always allowed
_FRAMEWORK_MODULE_PREFIXES = (
"agent_framework.",
"agent_framework_orchestrations.",
@uuzzrm
Ruiming Zhao (uuzzrm) marked this pull request as ready for review August 12, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Python : checkpoint restore +pending request deserialization failure when hosting workflow as agent with ResponsesHostserver in foundry

2 participants