You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: Python : checkpoint restore +pending request deserialization failure when hosting workflow as agent with ResponsesHostserver in foundry #7618
This occurs when a workflow is hosted as an agent via ResponseHostServer (Response protocol), aand the workflow is resumed across requests using previous_response_id
when it happened
During the hosted-agent execution (work-as-agent ), sfter a prior turn produced request_info and pending requests.
on the next /responses call with previous_response_id + function_call_output, the server restored checkpoint state and failed on deserializing a pending request type.
observed behaviour
checkpoint decode warning: checkpoint deserialization blocked for type 'agent_framework_orchestrations._handoff:HandoffAgentUserRequest'
checkpoint deserialization blocked for type agent_framework_orchestrations._magentic:MagenticPlanReviewRequest
Restore proceeded from an older/other checkpoint state
Follow-up response was rejected
`ValueError :Response provided for unknown request Id :<request_id>
Expected
When hosting workflow as agent:
-pending request checkpoint state should restore reliably across turns
changed the title [-]Python : checkpoint restore +pending request deserialization failure when hosting workflow as agent with ResponsesHostserver in foundry[/-][+]Python: Python : checkpoint restore +pending request deserialization failure when hosting workflow as agent with ResponsesHostserver in foundry[/+]on Aug 11, 2026
🤖 Automated triage reproduction notes(agent-authored — trust but verify)
Agent analysis
Repro: _RestrictedUnpickler.find_class() in packages/core/agent_framework/_workflows/_checkpoint_encoding.py (line 200) rejects types from agent_framework_orchestrations.* because _FRAMEWORK_MODULE_PREFIX on line 72 is "agent_framework." which doesn't match "agent_framework_orchestrations." (underscore vs dot). Triggered when FileCheckpointStorage (or any storage passing allowed_types != None) deserializes a checkpoint containing HandoffAgentUserRequest or MagenticPlanReviewRequest. Minimal repro: encode a HandoffAgentUserRequest via encode_checkpoint_value then decode with allowed_types=frozenset() — the restricted unpickler raises "deserialization blocked".
I can prepare a focused fix for this. The triage notes point to the checkpoint allowlist rejecting �gent_framework_orchestrations.* because it only matches the dotted �gent_framework. prefix. I’ll verify the repro on current main, add a regression test for the affected pending request types, and keep the change limited to checkpoint deserialization.
A normal HandoffBuilder user-input pause still cannot be saved with default FileCheckpointStorage on source main ebcf4db7f9462ef6c377761e0b3159c4c5a73027, although the orchestration registrations from #8258 are present. This looks like additional evidence for this existing orchestration-checkpoint issue rather than a separate issue or a competing implementation.
The workflow itself supplies a list[Message] response type for HandoffAgentUserRequest. At the pause boundary, file checkpoint save-time validation reports types:GenericAlias; the pending-request checkpoint is not saved. The latest successfully saved checkpoint contains no pending request, so attempting the normal reply against that checkpoint then raises No pending requests found in workflow context. This is a failed pause save, not corruption of a successfully saved pause checkpoint.
The same ordinary handoff and reply with InMemoryCheckpointStorage saves one pending request and resumes successfully. The file case saves zero pending requests in its latest available checkpoint. Both use real Agent, function/middleware layers, public HandoffBuilder, and deterministic local chat responses, with the required per-service-call history persistence enabled; there is no application state, custom codec, extra allowed type or fault injection.
Minimal reproduction
Run with both Core and orchestrations resolving to the source revision above:
The file run logs this during checkpoint creation, then the reply raises the pending-request error:
Failed to create checkpoint at iteration 2: Failed to decode pickled checkpoint data:
Checkpoint deserialization blocked for type 'types:GenericAlias'.
...
RuntimeError: No pending requests found in workflow context.
Tested on Windows / Python 3.14.3, using source Core 1.22.0 and orchestrations 1.3.2 with cached dependencies (installed Core metadata 1.19.0). A second independent local business example produced the same memory/file difference. This does not cover live models, Foundry hosting, AG-UI, streaming, other Python versions or a full suite.
Related scope: #7618 / #7789 and the already merged #8258 cover built-in orchestration checkpoint types; #7831 owns the broader recovery/fallback behavior. #9440 needs an explicitly allowed application ZoneInfo value, whereas this example contains only framework-generated response types and ordinary text. Could maintainers confirm the direction for this remaining built-in Handoff case within the existing route? No implementation or allowlist change is included.
AI assistance: analysis, reproduction, and writing.
Activity
[-]Python : checkpoint restore +pending request deserialization failure when hosting workflow as agent with ResponsesHostserver in foundry[/-][+]Python: Python : checkpoint restore +pending request deserialization failure when hosting workflow as agent with ResponsesHostserver in foundry[/+]github-actions commentedon Aug 12, 2026
🤖 Automated triage reproduction notes (agent-authored — trust but verify)
Agent analysis
Repro: _RestrictedUnpickler.find_class() in packages/core/agent_framework/_workflows/_checkpoint_encoding.py (line 200) rejects types from agent_framework_orchestrations.* because _FRAMEWORK_MODULE_PREFIX on line 72 is "agent_framework." which doesn't match "agent_framework_orchestrations." (underscore vs dot). Triggered when FileCheckpointStorage (or any storage passing allowed_types != None) deserializes a checkpoint containing HandoffAgentUserRequest or MagenticPlanReviewRequest. Minimal repro: encode a HandoffAgentUserRequest via encode_checkpoint_value then decode with allowed_types=frozenset() — the restricted unpickler raises "deserialization blocked".
python/packages/core/tests/workflow/test_checkpoint_orchestrations_deserialization.pyagent-framework-core==1.13.0, agent-framework-foundry-hosting==1.0.0.b260730agent-framework-core==1.13.0, agent-framework-foundry-hosting==1.0.0b260730uuzzrm commentedon Aug 12, 2026
I can prepare a focused fix for this. The triage notes point to the checkpoint allowlist rejecting �gent_framework_orchestrations.* because it only matches the dotted �gent_framework. prefix. I’ll verify the repro on current main, add a regression test for the affected pending request types, and keep the change limited to checkpoint deserialization.
ktz03 commentedon Oct 18, 2026
A normal
HandoffBuilderuser-input pause still cannot be saved with defaultFileCheckpointStorageon source mainebcf4db7f9462ef6c377761e0b3159c4c5a73027, although the orchestration registrations from #8258 are present. This looks like additional evidence for this existing orchestration-checkpoint issue rather than a separate issue or a competing implementation.The workflow itself supplies a
list[Message]response type forHandoffAgentUserRequest. At the pause boundary, file checkpoint save-time validation reportstypes:GenericAlias; the pending-request checkpoint is not saved. The latest successfully saved checkpoint contains no pending request, so attempting the normal reply against that checkpoint then raisesNo pending requests found in workflow context.This is a failed pause save, not corruption of a successfully saved pause checkpoint.The same ordinary handoff and reply with
InMemoryCheckpointStoragesaves one pending request and resumes successfully. The file case saves zero pending requests in its latest available checkpoint. Both use realAgent, function/middleware layers, publicHandoffBuilder, and deterministic local chat responses, with the required per-service-call history persistence enabled; there is no application state, custom codec, extra allowed type or fault injection.Minimal reproduction
Run with both Core and orchestrations resolving to the source revision above:
Observed output:
The file run logs this during checkpoint creation, then the reply raises the pending-request error:
Tested on Windows / Python 3.14.3, using source Core 1.22.0 and orchestrations 1.3.2 with cached dependencies (installed Core metadata 1.19.0). A second independent local business example produced the same memory/file difference. This does not cover live models, Foundry hosting, AG-UI, streaming, other Python versions or a full suite.
Related scope: #7618 / #7789 and the already merged #8258 cover built-in orchestration checkpoint types; #7831 owns the broader recovery/fallback behavior. #9440 needs an explicitly allowed application
ZoneInfovalue, whereas this example contains only framework-generated response types and ordinary text. Could maintainers confirm the direction for this remaining built-in Handoff case within the existing route? No implementation or allowlist change is included.AI assistance: analysis, reproduction, and writing.