Skip to content

[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs - #4037

Merged
Jacob Alber (lokitoth) merged 2 commits into
mainfrom
dev/dotnet_workflow/decouple_checkpointing
Feb 19, 2026
Merged

[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs#4037
Jacob Alber (lokitoth) merged 2 commits into
mainfrom
dev/dotnet_workflow/decouple_checkpointing

Conversation

@lokitoth

Copy link
Copy Markdown
Contributor

Motivation and Context

To support execution environments that do not support bring-your-own Checkpointing, we need to remove the ability to introduce CheckpointManager during a RunAsync / StreamAsync call.

Description

Change Checkpointing to be a configuration of IWorkflowExecutionEnvironment intrinsically. This changes how checkpointing is configured for InProcessExecutionEnvironment (now using WithCheckpointing)

BREAKING: Changes how Checkpointing is attached for InMemory execution.

Currently in draft form pending #3792

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@lokitothJacob Alber (lokitoth) added the .NET Usage: [Issues, PRs], Target: .Net label Feb 18, 2026
@lokitothJacob Alber (lokitoth) added workflows Usage: [Issues, PRs], Target: Workflows breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible labels Feb 18, 2026
@github-actionsgithub-actionsBot changed the title Decouple Checkpointing from Run/StreamAsync APIs.NET: Decouple Checkpointing from Run/StreamAsync APIsFeb 18, 2026
@lokitoth
Jacob Alber (lokitoth)force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 40b7c4d to f410d06CompareFebruary 18, 2026 22:25
@lokitoth
Jacob Alber (lokitoth)force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from f410d06 to 36c3dc0CompareFebruary 18, 2026 22:49
@lokitoth
Jacob Alber (lokitoth) marked this pull request as ready for review February 18, 2026 22:57
CopilotAI review requested due to automatic review settings February 18, 2026 22:58
@lokitothJacob Alber (lokitoth) changed the title .NET: Decouple Checkpointing from Run/StreamAsync APIs[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIsFeb 18, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a breaking change to decouple checkpointing from the workflow execution APIs. Instead of passing a CheckpointManager as a parameter to RunAsync and StreamAsync methods, checkpointing is now configured as an intrinsic property of the IWorkflowExecutionEnvironment using the new WithCheckpointing() method on InProcessExecutionEnvironment.

Changes:

  • Removes CheckpointManager parameters from all RunAsync, StreamAsync, and ResumeAsync methods in IWorkflowExecutionEnvironment
  • Introduces WithCheckpointing() method on InProcessExecutionEnvironment to configure checkpointing
  • Replaces Checkpointed<T> wrapper class with CheckpointableRunBase base class that both Run and StreamingRun now inherit from
  • Updates WorkflowHostAgent and WorkflowSession to manage checkpointing configuration internally
  • Adds IsCheckpointingEnabled property to the execution environment interface

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
IWorkflowExecutionEnvironment.csRemoves checkpointing-related method overloads and adds IsCheckpointingEnabled property
InProcessExecutionEnvironment.csAdds WithCheckpointing() method and internal checkpoint manager configuration
InProcessExecution.csUpdates static helper methods to use WithCheckpointing() pattern
Checkpointed.csConverts from generic wrapper to base class CheckpointableRunBase
Run.cs / StreamingRun.csChanges to inherit from CheckpointableRunBase instead of being wrapped by Checkpointed<T>
WorkflowSession.csUpdates to configure checkpointing on the execution environment rather than passing it to run methods
WorkflowHostAgent.csRemoves checkpointing parameter from constructor and validation logic
InProcessRunner.csAdds checkpoint index restoration and IsCheckpointingEnabled property
CheckpointManager.cs / ICheckpointManager.csAdds RetrieveIndexAsync method for retrieving checkpoint collections
Test filesUpdates all test code to use new checkpointing pattern
Sample filesUpdates all sample code to use new checkpointing pattern

Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/InProcessExecution.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/Checkpointed.cs Outdated
Comment threaddotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunner.cs Outdated
@lokitoth
Jacob Alber (lokitoth)force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 666f3c1 to 0023a26CompareFebruary 19, 2026 15:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changeUsage: [PRs], Target: all PRs that introduce changes that are not backward compatible.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@lokitoth@markwallace-microsoft@westey-m