From 155b45a34a2460d3523549df76db65d2ddf916a2 Mon Sep 17 00:00:00 2001 From: Zhangyi Yuan Date: Mon, 14 Sep 2026 11:57:35 +0800 Subject: [PATCH 1/2] Fix the .NET manual tool resume sample build PermissionDecisionApproveOnce is marked [Experimental], so GHCP001 is reported as an error and 'dotnet build ManualToolResume.cs' fails. Suppress it around the call the way dotnet/src/Client.cs and the docs already do. --- dotnet/samples/ManualToolResume.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/samples/ManualToolResume.cs b/dotnet/samples/ManualToolResume.cs index becda7444d..55bbe37557 100644 --- a/dotnet/samples/ManualToolResume.cs +++ b/dotnet/samples/ManualToolResume.cs @@ -36,9 +36,11 @@ await session1.SendAsync(new MessageOptions session2, evt => evt.Data.ToolName == "manual_resume_status"); +#pragma warning disable GHCP001 await session2.Rpc.Permissions.HandlePendingPermissionRequestAsync( permissionEvent.Data.RequestId, new PermissionDecisionApproveOnce()); +#pragma warning restore GHCP001 var toolEvent = await toolRequested; await client2.ForceStopAsync(); From 0c26e33238906bba25ee119d001f6ca2f2f9adf3 Mon Sep 17 00:00:00 2001 From: Zhangyi Yuan Date: Tue, 15 Sep 2026 18:49:57 +0800 Subject: [PATCH 2/2] Use the PermissionDecision.ApproveOnce factory in the sample Matches PermissionHandlers.cs and the documented discoverability entry point. The suppression stays because the PermissionDecision base class is itself [Experimental]. --- dotnet/samples/ManualToolResume.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/samples/ManualToolResume.cs b/dotnet/samples/ManualToolResume.cs index 55bbe37557..ced45a378a 100644 --- a/dotnet/samples/ManualToolResume.cs +++ b/dotnet/samples/ManualToolResume.cs @@ -39,7 +39,7 @@ await session1.SendAsync(new MessageOptions #pragma warning disable GHCP001 await session2.Rpc.Permissions.HandlePendingPermissionRequestAsync( permissionEvent.Data.RequestId, - new PermissionDecisionApproveOnce()); + PermissionDecision.ApproveOnce()); #pragma warning restore GHCP001 var toolEvent = await toolRequested;