microsoft / microsoft/agent-framework

Python: AgentSession Pending Request Resume Failure

Open
#5,818 6 comments 1 reaction 2 assignees Claimed by @TaoChenOSU View on GitHub
bug orchestration python reproduced workflows
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

I am using AgentSession to persist and restore workflow execution state in Python. The scenario that fails is Magentic orchestration with human plan review enabled.

When the workflow pauses for human plan review, the SSE stream emits a request_id. I persist the session state, including the pending request metadata, and then try to resume the same session by sending feedback for that same request_id. The session does not resume the pending request and instead errors.

Expected behavior :

If a session pauses on request_info and I restore that same AgentSession later, responding with the same request_id should resume execution successfully.

Question :

How should pending requests in `AgentSession` be handled after restoring a persisted session? Specifically, if human plan review in Magentic generates a `request_id` and that pending request is saved in session state, what is the correct way to resume it later using the same `request_id`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.