Skip to content

.NET: [BREAKING] Rename session state json param - #3681

Merged
westey (westey-m) merged 3 commits into
microsoft:mainfrom
westey-m:rename-session-state-json-param
Feb 4, 2026
Merged

.NET: [BREAKING] Rename session state json param#3681
westey (westey-m) merged 3 commits into
microsoft:mainfrom
westey-m:rename-session-state-json-param

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

Addressing review feedback: #2532

Description

  • Rename parameter name for json session state to be consistent across different classes in core libraries.

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.

CopilotAI review requested due to automatic review settings February 4, 2026 18:31
@markwallace-microsoftMark Wallace (markwallace-microsoft) added .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Feb 4, 2026
@github-actionsgithub-actionsBot changed the title [BREAKING] Rename session state json param.NET: [BREAKING] Rename session state json paramFeb 4, 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 renames the serializedSession parameter to serializedState in the DeserializeSessionAsync method across the codebase to achieve consistent naming. This is a breaking API change that addresses review feedback from PR #2532.

Changes:

  • Renamed parameter from serializedSession to serializedState in DeserializeSessionAsync method signatures across all AIAgent implementations
  • Updated XML documentation comments to reflect the parameter rename
  • Updated parameter usage within method bodies and session constructors

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.csUpdated abstract method signature and XML docs for DeserializeSessionAsync
dotnet/src/Microsoft.Agents.AI.Abstractions/DelegatingAIAgent.csUpdated DeserializeSessionAsync implementation to use new parameter name
dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryAgentSession.csUpdated constructor parameter name and XML docs
dotnet/src/Microsoft.Agents.AI.Abstractions/ServiceIdAgentSession.csUpdated constructor parameter name and XML docs
dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI.CopilotStudio/CopilotStudioAgent.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgent.csUpdated DeserializeSessionAsync implementation and XML docs
dotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgentProxy.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI.Purview/PurviewAgent.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowHostAgent.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgent.csUpdated DeserializeSessionAsync implementation
dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentSession.csUpdated DeserializeAsync internal method parameter name and XML docs
dotnet/samples/GettingStarted/AgentProviders/Agent_With_CustomImplementation/Program.csUpdated DeserializeSessionAsync implementation in sample
dotnet/tests/* (18 test files)Updated DeserializeSessionAsync implementations in test agents

Comment threaddotnet/src/Microsoft.Agents.AI.DurableTask/DurableAIAgent.cs
@markwallace-microsoftMark Wallace (markwallace-microsoft) added the documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs label Feb 4, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationUsage: [Issues, PRs], Target: documentation in the code base and learn docs.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@westey-m@peibekwe@markwallace-microsoft