From 94b96061e611f8c8f0d90a2c100ba3b131ff8a7c Mon Sep 17 00:00:00 2001 From: Chandramouleswaran Ravichandran Date: Tue, 9 Jun 2026 23:10:32 -0700 Subject: [PATCH 1/2] .NET: Fix ReasoningSummary passthrough in GitHub Copilot resume config CopyResumeSessionConfig hand-copies a subset of SessionConfigBase into a new ResumeSessionConfig instead of using Clone(). It was missing ReasoningSummary, so callers that set SessionConfig.ReasoningSummary got readable extended-thinking summaries on the first turn but had it silently dropped on every resumed turn. ContextTier (a sibling model/context knob passed alongside ReasoningEffort/ReasoningSummary) was missing too. Both are now copied, mirroring ReasoningEffort. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../GitHubCopilotAgent.cs | 2 ++ .../GitHubCopilotAgentTests.cs | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs index 053a08f725..e25548cd54 100644 --- a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs @@ -291,6 +291,8 @@ internal static ResumeSessionConfig CopyResumeSessionConfig(SessionConfig? sourc { Model = source?.Model, ReasoningEffort = source?.ReasoningEffort, + ReasoningSummary = source?.ReasoningSummary, + ContextTier = source?.ContextTier, Tools = source?.Tools, SystemMessage = source?.SystemMessage, AvailableTools = source?.AvailableTools, diff --git a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs index 944f2f30ab..ec861b012c 100644 --- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs @@ -167,6 +167,8 @@ public void CopyResumeSessionConfig_CopiesAllProperties() { Model = "gpt-4o", ReasoningEffort = "high", + ReasoningSummary = ReasoningSummary.Detailed, + ContextTier = ContextTier.LongContext, Tools = tools, SystemMessage = systemMessage, AvailableTools = ["tool1", "tool2"], @@ -187,6 +189,8 @@ public void CopyResumeSessionConfig_CopiesAllProperties() // Assert Assert.Equal("gpt-4o", result.Model); Assert.Equal("high", result.ReasoningEffort); + Assert.Equal(ReasoningSummary.Detailed, result.ReasoningSummary); + Assert.Equal(ContextTier.LongContext, result.ContextTier); Assert.Same(tools, result.Tools); Assert.Same(systemMessage, result.SystemMessage); Assert.Equal(new List { "tool1", "tool2" }, result.AvailableTools); @@ -221,6 +225,26 @@ public void CopyResumeSessionConfig_WithNullSource_ReturnsDefaults() Assert.True(result.Streaming); } + [Fact] + public void CopyResumeSessionConfig_RoundTripsReasoningSummary() + { + // Regression: ReasoningSummary controls whether the model returns readable + // extended-thinking summaries. It must round-trip onto resumed turns, just like + // ReasoningEffort, otherwise callers lose readable reasoning after the first turn. + var source = new SessionConfig + { + ReasoningEffort = "high", + ReasoningSummary = ReasoningSummary.Detailed, + }; + + // Act + ResumeSessionConfig result = GitHubCopilotAgent.CopyResumeSessionConfig(source); + + // Assert + Assert.Equal(ReasoningSummary.Detailed, result.ReasoningSummary); + Assert.Equal("high", result.ReasoningEffort); + } + [Fact] public void ConvertToAgentResponseUpdate_AssistantMessageEvent_DoesNotEmitTextContent() { From e98bb2853810819561d81d8b6453e2b201a928bd Mon Sep 17 00:00:00 2001 From: Chandramouleswaran Ravichandran Date: Tue, 9 Jun 2026 23:47:16 -0700 Subject: [PATCH 2/2] .NET: Assert ReasoningSummary/ContextTier defaults in null-source resume test Addresses PR review: the null-source CopyResumeSessionConfig test now also asserts ReasoningSummary and ContextTier default to null, locking the intended default behavior of the newly copied properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../GitHubCopilotAgentTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs index ec861b012c..887edf4636 100644 --- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs @@ -215,6 +215,8 @@ public void CopyResumeSessionConfig_WithNullSource_ReturnsDefaults() // Assert Assert.Null(result.Model); Assert.Null(result.ReasoningEffort); + Assert.Null(result.ReasoningSummary); + Assert.Null(result.ContextTier); Assert.Null(result.Tools); Assert.Null(result.SystemMessage); Assert.Null(result.OnPermissionRequest);