Python: Register built-in orchestration types for checkpoint restore - #7791
Draft
Atharva Vichare (atty57) wants to merge 2 commits into
Draft
Python: Register built-in orchestration types for checkpoint restore#7791Atharva Vichare (atty57) wants to merge 2 commits into
Atharva Vichare (atty57) wants to merge 2 commits into
Conversation
Group chat, handoff, and Magentic orchestrations send framework-owned dataclasses as executor messages and request_info payloads. Those types live in agent_framework_orchestrations, which is outside the "agent_framework." module prefix that the restricted checkpoint unpickler auto-allows, so restoring a checkpoint failed unless the user listed the internal module paths in allowed_checkpoint_types. Register them with the existing register_checkpoint_type API at package import so built-in orchestrations restore without user configuration. Fixes microsoft#7789
Atharva Vichare (atty57)
deployed
to
github-app-auth
August 20, 2026 15:49 — with
GitHub Actions
Active
Atharva Vichare (atty57)
deployed
to
github-app-auth
August 20, 2026 15:49 — with
GitHub Actions
Active
Atharva Vichare (atty57)
deployed
to
github-app-auth
August 20, 2026 15:49 — with
GitHub Actions
Active
Atharva Vichare (atty57)
deployed
to
github-app-auth
August 20, 2026 15:53 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
Pull request overview
Registers built-in orchestration payloads for restricted checkpoint restoration.
Changes:
- Registers group-chat, handoff, and Magentic checkpoint types at package import.
- Adds restricted allowlist restoration tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
agent_framework_orchestrations/__init__.py |
Registers orchestration checkpoint types. |
tests/test_checkpoint_types.py |
Tests registration and envelope restoration. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| [ | ||
| HandoffAgentUserRequest, | ||
| AgentRequestInfoResponse, | ||
| MagenticPlanReviewRequest, |
Remove parameter '_MagenticTaskLedger' from function as its already taken care of with an override for converting it to_dict and from_dict
Atharva Vichare (atty57)
deployed
to
github-app-auth
August 20, 2026 16:55 — with
GitHub Actions
Active
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
GroupChatBuilder,HandoffBuilder, andMagenticBuilderroute framework-owned dataclasses as executor-to-executor messages and asrequest_infopayloads/responses. Those types live inagent_framework_orchestrations, which is outside theagent_framework.module prefix that the restricted checkpoint unpickler auto-allows.The result is that restoring a checkpoint from a built-in orchestration fails unless the user hand-maintains an allowlist of internal framework module paths:
Users should not have to track framework-internal module paths to restore a framework-provided orchestration.
Description & Review Guide
What are the major changes?
agent_framework_orchestrations/__init__.pyregisters the package's checkpoint-crossing types through the existing publicregister_checkpoint_typeAPI at import time.HandoffAgentUserRequest,AgentRequestInfoResponse,MagenticResetSignal,MagenticPlanReviewRequest/MagenticPlanReviewResponse, and the ledger types nested inside the plan review request.tests/test_checkpoint_types.pyround-trips the envelopes throughencode_checkpoint_value/decode_checkpoint_valueunder a restricted allowlist (allowed_types=frozenset()), and asserts therequest_infopayload/response types are registered.What is the impact of these changes?
allowed_checkpoint_typesconfiguration. The previously documented workaround keeps working; it is now redundant.What do you want reviewers to focus on?
GroupChatState,OrchestrationState, andMagenticContextare deliberately excluded because they persist throughto_dict/from_dictrather than pickle.Related Issue
Fixes #7789
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.