-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: ctrl-C interruption in the CLI #4057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| mut command: Command, | ||
| timeout: &Option<u64>, | ||
| ) -> ExtensionResult<McpClient> { | ||
| command.process_group(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you said we'd give them their own process group, isn't this the same process group? also, does this work on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 sets it to its own group (uses the pid)
Re: Windows: eh, I think no. I don't actually even know what the current behavior here is on windows. I don't have windows machine to test. Any ideas there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah there is no process_group on windows it seems.
| .spawn()?; | ||
| let mut stderr = stderr | ||
| .take() | ||
| .expect("should have a stderr handle because it was requested"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't happen of course, but I'd still rather do .ok_or or something so we don't panic
|
what behavior change would we expect here - control-C hard exits the session now (new as of this month) not sure if that is meant to change as well? |
|
yes this fixes: #4026 |
michaelneale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is much improved - as for windows, that process group is a no-op so it is no worse.
* main: docs: mcp-ui support (#4049) fix: delete dialog layout (#4037) ci: fix markdown file pattern to skip builds for all .md files (#4061) docs: add window title (#4059) blog: cleaning up some posts (#4050) fix: this should be a debug message not a warn (#4024) Better provider logging (#4052) feat: ToolError migration to ErrorData (#4051) docs: rename sessions (#4053) Add mcp automated testing blog (#4004)
Co-authored-by: Michael Neale <michael.neale@gmail.com>
* 'main' of github.com:block/goose: fix(build): feed electronforge the icon explicitly for linux (#4045) Docs: Troubleshooting tip - Nodejs path on windows (#4065) fix: flag out uncompilable bit in windows (#4068) ci: fix docs-only filter to properly skip tests for documentation changes (#4066) fix: ctrl-C interruption in the CLI (#4057)
* 'main' of github.com:block/goose: (120 commits) Docs: Troubleshooting tip - Nodejs path on windows (#4065) fix: flag out uncompilable bit in windows (#4068) ci: fix docs-only filter to properly skip tests for documentation changes (#4066) fix: ctrl-C interruption in the CLI (#4057) docs: mcp-ui support (#4049) fix: delete dialog layout (#4037) ci: fix markdown file pattern to skip builds for all .md files (#4061) docs: add window title (#4059) blog: cleaning up some posts (#4050) fix: this should be a debug message not a warn (#4024) Better provider logging (#4052) feat: ToolError migration to ErrorData (#4051) docs: rename sessions (#4053) Add mcp automated testing blog (#4004) MCP session replay integration test (#3939) Docs: Cost tracking in CLI (#4043) sanitize message content on deserialization (#3966) Move summarize button inside of context view (#4015) blog: post on lead/worker model (#3994) Actually send cancellation to MCP servers (#3865) ...
…ol-visibility * origin/main: (43 commits) docs: Blog - How I Used Goose to Rebuild My Website (#4076) docs: custom context file names (#4077) Blog: How Pulse MCP Used Goose to Automate Their Newsletter (#4075) Load recipe deeplinks in single window when app is closed (#4048) docs: make accurate the comments with links to unsigned builds of the app (#4070) cleanup memory in chat (#4073) CLI: improve model selection ux (#4071) speed up loading extensions by loading in parallel (#4054) fix(build): feed electronforge the icon explicitly for linux (#4045) Docs: Troubleshooting tip - Nodejs path on windows (#4065) fix: flag out uncompilable bit in windows (#4068) ci: fix docs-only filter to properly skip tests for documentation changes (#4066) fix: ctrl-C interruption in the CLI (#4057) docs: mcp-ui support (#4049) fix: delete dialog layout (#4037) ci: fix markdown file pattern to skip builds for all .md files (#4061) docs: add window title (#4059) blog: cleaning up some posts (#4050) fix: this should be a debug message not a warn (#4024) Better provider logging (#4052) ...
Co-authored-by: Michael Neale <michael.neale@gmail.com> Signed-off-by: Jack Wright <jack.wright@nike.com>
The new rmcp child processes were getting the signals forwarded to them. Avoid this by giving them their own process group. They are still cleaned up when the parent exits.
This also fixes the fact that we had three different ways of spawning a child process for an extension (stdio, builtin, and inline python)
fixes: #4026