From 21e75b82216d91d46f03040d040ab9ef00fa763b Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sat, 4 Oct 2025 00:50:14 -0400 Subject: [PATCH] Pass through `cwd` from ACP extension (#39511) If we get a `cwd` from ACP (because e.g. `codex-acp` is driving the terminal rather than our own PTY) then use that to display the `cwd` of the terminal process. Release Notes: - N/A --- crates/agent_servers/src/acp.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/agent_servers/src/acp.rs b/crates/agent_servers/src/acp.rs index 2b977d60df..245d899f8a 100644 --- a/crates/agent_servers/src/acp.rs +++ b/crates/agent_servers/src/acp.rs @@ -713,6 +713,9 @@ impl acp::Client for ClientDelegate { if let Some(id_str) = terminal_info.get("terminal_id").and_then(|v| v.as_str()) { let terminal_id = acp::TerminalId(id_str.into()); + let cwd = terminal_info + .get("cwd") + .and_then(|v| v.as_str().map(PathBuf::from)); // Create a minimal display-only lower-level terminal and register it. let _ = session.thread.update(&mut self.cx.clone(), |thread, cx| { @@ -727,7 +730,7 @@ impl acp::Client for ClientDelegate { TerminalProviderEvent::Created { terminal_id: terminal_id.clone(), label: tc.title.clone(), - cwd: None, + cwd, output_byte_limit: None, terminal: lower, },