Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/goose-mcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ mod memory;
pub mod peekaboo;
pub mod subprocess;
pub mod tutorial;
#[cfg(windows)]
pub mod windows_job;

pub use autovisualiser::AutoVisualiserRouter;
pub use computercontroller::ComputerControllerServer;
Expand Down
2 changes: 1 addition & 1 deletion crates/goose-mcp/src/subprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn resolve_login_shell_path() -> Option<String> {
.stdout(Stdio::piped())
.stderr(Stdio::null());

// Spawn in a new session so that interactive shells job-control setup
// Spawn in a new session so that interactive shell job-control setup
// cannot steal the terminal foreground from the parent goose process.
cmd.wrap(ProcessSession);

Expand Down
22 changes: 0 additions & 22 deletions crates/goose-mcp/src/windows_job.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/goose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ subtle = { version = "2.5", default-features = false, features = ["std"] }
gethostname = "1.1.0"

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3.9", default-features = false, features = ["wincred", "std", "jobapi2", "winbase", "winnt", "processthreadsapi", "handleapi", "minwindef"] }
winapi = { workspace = true }
keyring = { workspace = true, features = ["windows-native"], optional = true }

# Platform-specific GPU acceleration for Whisper and local inference
Expand Down
9 changes: 0 additions & 9 deletions crates/goose/src/agents/extension_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,6 @@ async fn child_process_client(
let (transport, mut stderr) = TokioChildProcess::builder(command)
.stderr(Stdio::piped())
.spawn()?;
Comment on lines 400 to 402

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore cleanup for Windows MCP subprocesses

When running on Windows with a stdio MCP extension, this spawn now has no remaining cleanup path that ties the child process to the goose process; configure_subprocess only sets CREATE_NO_WINDOW on Windows, and the job-object attachment removed by this revert was the code that terminated those children when goose exits. Long-running MCP servers can therefore survive a crash or normal process teardown and keep resources/ports/files open until the user kills them manually.

Useful? React with 👍 / 👎.

// Attach the child to a Windows Job Object to ensure proper cleanup on Goose exit
#[cfg(windows)]
{
if let Some(pid) = transport.id() {
// Initialize Job Object and attach the child process to it
crate::windows_job::init_windows_cleanup();
crate::windows_job::attach_pid_to_job(pid);
}
}
let mut stderr = stderr.take().ok_or_else(|| {
ExtensionError::SetupError("failed to attach child process stderr".to_owned())
})?;
Expand Down
3 changes: 0 additions & 3 deletions crates/goose/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ pub mod slash_commands;
pub mod source_roots;
pub mod sources;
pub mod subprocess;

pub mod token_counter;
pub mod tool_inspection;
pub mod tool_monitor;
pub mod tracing;
pub mod utils;
#[cfg(windows)]
pub mod windows_job;
102 changes: 0 additions & 102 deletions crates/goose/src/windows_job.rs

This file was deleted.

Loading