Skip to content

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

Merged
lokitoth merged 2 commits intomainfrom
dev/dotnet_workflow/decouple_checkpointing
Feb 19, 2026
Merged

[BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs#4037
lokitoth merged 2 commits intomainfrom
dev/dotnet_workflow/decouple_checkpointing

Conversation

@lokitoth
Copy link
Member

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.

@lokitoth lokitoth added the .NET label Feb 18, 2026
@lokitoth lokitoth added workflows Related to Workflows in agent-framework breaking change Introduces changes that are not backward compatible and may require updates to dependent code. labels Feb 18, 2026
@github-actions github-actions bot changed the title Decouple Checkpointing from Run/StreamAsync APIs .NET: Decouple Checkpointing from Run/StreamAsync APIs Feb 18, 2026
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 40b7c4d to f410d06 Compare February 18, 2026 22:25
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from f410d06 to 36c3dc0 Compare February 18, 2026 22:49
@lokitoth lokitoth marked this pull request as ready for review February 18, 2026 22:57
Copilot AI review requested due to automatic review settings February 18, 2026 22:58
@lokitoth lokitoth changed the title .NET: Decouple Checkpointing from Run/StreamAsync APIs [BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs Feb 18, 2026
Copy link
Contributor

Copilot AI left a comment

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
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

@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 36c3dc0 to 2592bbb Compare February 18, 2026 23:12
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 2592bbb to 6152cd8 Compare February 19, 2026 12:47
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 6152cd8 to 666f3c1 Compare February 19, 2026 13:06
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 666f3c1 to 0023a26 Compare February 19, 2026 15:37
@lokitoth lokitoth force-pushed the dev/dotnet_workflow/decouple_checkpointing branch from 6ac6613 to 0ccfd9d Compare February 19, 2026 16:25
@lokitoth lokitoth enabled auto-merge February 19, 2026 16:26
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible and may require updates to dependent code. .NET workflows Related to Workflows in agent-framework

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants