From d50371729a750d921b8271a2ee5ab1a8f6597241 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Mon, 17 Nov 2025 16:50:26 -0300 Subject: [PATCH] Clarify exception handling in ConversationId property (#1457) Update XML documentation to clarify exception behavior. See `ChatClientAgentThreadTests.SetConversationIdThrowsWhenMessageStoreIsSet` which already verifies this is the actual behavior. Co-authored-by: Chris <66376200+crickman@users.noreply.github.com> --- .../Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs b/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs index ad224e6777..f0f51895b2 100644 --- a/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs +++ b/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs @@ -75,8 +75,8 @@ public class ChatClientAgentThread : AgentThread /// /// /// Note that either or may be set, but not both. - /// If is not null, and is set, - /// will be reverted to null, and vice versa. + /// If is not null, setting will throw an + /// exception. /// /// /// This property may be null in the following cases: @@ -91,6 +91,7 @@ public class ChatClientAgentThread : AgentThread /// to fork the thread with each iteration. /// /// + /// Attempted to set a conversation ID but a is already set. public string? ConversationId { get => this._conversationId;