You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plumb cancellationtokens through all CLI commands for consistent behavior #56331
A good follow-up might be to make async commands more first-class in the .NET CLI / in CommandBase. As far as I can tell, I don't think the synchronous version of ToolExecuteCommand.Execute() is called from anywhere.
The Func<ParseResult, CancellationToken, Task<int>> overload of System.CommandLine's SetAction provides the cancellation token, and we can plumb that through every Command we create so that a Ctrl+C/SIGTERM is handled correctly.
🏷️ Labels: Applied, modified, and already-present relevant labels:
Area-CLI
enhancement
needs team triageRequires a full team discussion
cli-uxIssues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on)
➡️ Summary: Proposes plumbing CancellationToken through all CLI commands via SetAction so Ctrl+C/SIGTERM is handled consistently. This is a cross-cutting design change affecting every command; recommend team discussion before implementation.
Generated by 🏷️ Issue Triage for #56331 · copilot · auto · 60.4 AIC · ⌖ 8.09 AIC · ⊞ 14.6K · ◷
Activity
github-actions commentedon Sep 17, 2026
🎯 Agentic Issue Triage
Triage Assessment:
@dotnet/dotnet-clihigh- Issue directly namesCommandBase/CLI command infrastructure, matching the unambiguous/src/Cli/CODEOWNERS section.➡️ Summary: Proposes plumbing
CancellationTokenthrough all CLI commands viaSetActionso Ctrl+C/SIGTERM is handled consistently. This is a cross-cutting design change affecting every command; recommend team discussion before implementation.