[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs#4037
Merged
[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs#4037
Conversation
40b7c4d to
f410d06
Compare
f410d06 to
36c3dc0
Compare
Contributor
There was a problem hiding this comment.
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
CheckpointManagerparameters from allRunAsync,StreamAsync, andResumeAsyncmethods inIWorkflowExecutionEnvironment - Introduces
WithCheckpointing()method onInProcessExecutionEnvironmentto configure checkpointing - Replaces
Checkpointed<T>wrapper class withCheckpointableRunBasebase class that bothRunandStreamingRunnow inherit from - Updates
WorkflowHostAgentandWorkflowSessionto manage checkpointing configuration internally - Adds
IsCheckpointingEnabledproperty 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
| File | Description |
|---|---|
IWorkflowExecutionEnvironment.cs |
Removes checkpointing-related method overloads and adds IsCheckpointingEnabled property |
InProcessExecutionEnvironment.cs |
Adds WithCheckpointing() method and internal checkpoint manager configuration |
InProcessExecution.cs |
Updates static helper methods to use WithCheckpointing() pattern |
Checkpointed.cs |
Converts from generic wrapper to base class CheckpointableRunBase |
Run.cs / StreamingRun.cs |
Changes to inherit from CheckpointableRunBase instead of being wrapped by Checkpointed<T> |
WorkflowSession.cs |
Updates to configure checkpointing on the execution environment rather than passing it to run methods |
WorkflowHostAgent.cs |
Removes checkpointing parameter from constructor and validation logic |
InProcessRunner.cs |
Adds checkpoint index restoration and IsCheckpointingEnabled property |
CheckpointManager.cs / ICheckpointManager.cs |
Adds RetrieveIndexAsync method for retrieving checkpoint collections |
| Test files | Updates all test code to use new checkpointing pattern |
| Sample files | Updates all sample code to use new checkpointing pattern |
36c3dc0 to
2592bbb
Compare
2592bbb to
6152cd8
Compare
6152cd8 to
666f3c1
Compare
westey-m
reviewed
Feb 19, 2026
dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunner.cs
Outdated
Show resolved
Hide resolved
westey-m
approved these changes
Feb 19, 2026
666f3c1 to
0023a26
Compare
0023a26 to
6ac6613
Compare
markwallace-microsoft
approved these changes
Feb 19, 2026
6ac6613 to
0ccfd9d
Compare
With this change, Checkpointing becomes an property of an IWorkflowExecutionEnvironment. This lets environments that are tightly-coupled to their CheckpointManager avoid needing to present APIs that would not work (e.g. taking in an InMemory CheckpointManager for Durable Tasks, for example)
0ccfd9d to
30b4cb6
Compare
This was referenced Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
To support execution environments that do not support bring-your-own Checkpointing, we need to remove the ability to introduce
CheckpointManagerduring aRunAsync/StreamAsynccall.Description
Change Checkpointing to be a configuration of
IWorkflowExecutionEnvironmentintrinsically. This changes how checkpointing is configured forInProcessExecutionEnvironment(now usingWithCheckpointing)BREAKING: Changes how Checkpointing is attached for InMemory execution.
Currently in draft form pending #3792
Contribution Checklist