microsoft / microsoft/agent-framework

Python: Support checkpoint hydration and new input in a single workflow run

Open
#7,863 1 comment 0 reactions 1 assignee View on GitHub

@moonbox3 is already working on this.

Since Aug 31, 2026.

python workflows
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

## Problem

When resuming a workflow from a persisted checkpoint, applications currently need two separate `workflow.run` calls:

1. Restore or hydrate the workflow from the checkpoint.
2. Submit the new user input and continue execution.

This creates an unnecessary round trip and complicates integrations that receive one logical request.

## Desired behavior

Allow a workflow to restore its checkpoint and process new input atomically in one run.

An illustrative API could be:

```python
response = await workflow.run(
messages=new_user_message,
checkpoint=checkpoint,
)
```

Alternatively, a dedicated API could make the intent explicit:

```python
response = await workflow.resume(
checkpoint=checkpoint,
messages=new_user_message,
)
```

The exact API shape is open for design.

## Expected semantics

The combined operation should:

1. Restore and validate the checkpoint.
2. Hydrate the workflow state.
3. Apply the new user input.
4. Continue workflow execution.
5. Return the resulting response or response stream.

The hydration step should not produce a separate intermediate response visible to the caller.

## Benefits

- Removes an unnecessary workflow execution and round trip.
- Avoids exposing an intermediate hydration response.
- Simplifies HTTP, hosted, and other request/response adapters.
- Preserves a single execution lifecycle for tracing, cancellation, errors, and streaming.
- Makes checkpoint-based workflow resumption behave more like session-based agent continuation.

## Acceptance criteria

- A workflow can accept both persisted checkpoint state and new input in one call.
- Checkpoint restoration occurs before the new input is processed.
- Existing two-step usage remains backward compatible.
- The behavior supports both streaming and non-streaming runs.
- Checkpoint validation and restoration failures are returned without executing the new input.
- The pattern is documented with a runnable example.

Related checkpoint recovery work: #7809.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.