Skip to content

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

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:

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

Alternatively, a dedicated API could make the intent explicit:

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.

Activity

  1. added
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Aug 25, 2026
  2. removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Aug 27, 2026
  3. moonbox3 commented on Aug 31, 2026

    @moonbox3
    Contributor

    This is going to require some deeper design. Any PRs opened by the community will be closed so that the MAF team can own this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

pythonUsage: [Issues, PRs], Target: PythonworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions