From 003aaa160ceed34661dff70372a379c4c0ee5318 Mon Sep 17 00:00:00 2001 From: Zane <75694352+zanesq@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:14:54 -0800 Subject: [PATCH] ACP get working dir from args.cwd (#6653) --- crates/goose-acp/src/server.rs | 4 +--- crates/goose-acp/tests/server_test.rs | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/goose-acp/src/server.rs b/crates/goose-acp/src/server.rs index 87932bf9fa..5552b09f03 100644 --- a/crates/goose-acp/src/server.rs +++ b/crates/goose-acp/src/server.rs @@ -49,7 +49,6 @@ pub struct GooseAcpAgent { pub struct GooseAcpConfig { pub provider: Arc, pub builtins: Vec, - pub work_dir: std::path::PathBuf, pub data_dir: std::path::PathBuf, pub config_dir: std::path::PathBuf, pub goose_mode: goose::config::GooseMode, @@ -308,7 +307,6 @@ impl GooseAcpAgent { Self::with_config(GooseAcpConfig { provider, builtins, - work_dir: std::env::current_dir().unwrap_or_default(), data_dir: Paths::data_dir(), config_dir: Paths::config_dir(), goose_mode, @@ -689,7 +687,7 @@ impl GooseAcpAgent { let manager = self.agent.config.session_manager.clone(); let goose_session = manager .create_session( - std::env::current_dir().unwrap_or_default(), + args.cwd.clone(), "ACP Session".to_string(), // just an initial name - may be replaced by maybe_update_name SessionType::User, ) diff --git a/crates/goose-acp/tests/server_test.rs b/crates/goose-acp/tests/server_test.rs index 4df7b4e7ef..e04e01f772 100644 --- a/crates/goose-acp/tests/server_test.rs +++ b/crates/goose-acp/tests/server_test.rs @@ -260,7 +260,6 @@ async fn spawn_server_in_process( let config = GooseAcpConfig { provider: Arc::new(provider), builtins: builtins.iter().map(|s| s.to_string()).collect(), - work_dir: data_root.to_path_buf(), data_dir: data_root.to_path_buf(), config_dir: data_root.to_path_buf(), goose_mode,