From 53214b474e835a2f01d0828f3a71aaf2cb3ff180 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Tue, 17 Feb 2026 13:50:51 +0100 Subject: [PATCH] acp: Update npm package for claude agent (#49353) (cherry-pick to stable) (#49355) Release Notes: - N/A --- crates/agent_servers/src/e2e_tests.rs | 2 +- crates/project/src/agent_server_store.rs | 30 +++++------------------- docs/src/ai/external-agents.md | 6 ++--- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/crates/agent_servers/src/e2e_tests.rs b/crates/agent_servers/src/e2e_tests.rs index 50740231b5cbe3352d6a0fa9ed6cf87da9f04c5f..c72b656c76acc1e3abcb3bd774d09f2651d026ee 100644 --- a/crates/agent_servers/src/e2e_tests.rs +++ b/crates/agent_servers/src/e2e_tests.rs @@ -416,7 +416,7 @@ pub async fn init_test(cx: &mut TestAppContext) -> Arc { project::agent_server_store::AllAgentServersSettings::override_global( project::agent_server_store::AllAgentServersSettings { claude: Some(BuiltinAgentServerSettings { - path: Some("claude-code-acp".into()), + path: Some("claude-agent-acp".into()), ..Default::default() }), gemini: Some(crate::gemini::tests::local_command().into()), diff --git a/crates/project/src/agent_server_store.rs b/crates/project/src/agent_server_store.rs index 9ddeb0c948f29e24ddec14be75d89f33214fc05b..1400dabb75e8e161fea33d5647231c8106229b71 100644 --- a/crates/project/src/agent_server_store.rs +++ b/crates/project/src/agent_server_store.rs @@ -1437,10 +1437,10 @@ impl ExternalAgentServer for LocalClaudeCode { (custom_command, None) } else { let mut command = get_or_npm_install_builtin_agent( - "claude-code-acp".into(), - "@zed-industries/claude-code-acp".into(), - "node_modules/@zed-industries/claude-code-acp/dist/index.js".into(), - Some("0.5.2".parse().unwrap()), + "claude-agent-acp".into(), + "@zed-industries/claude-agent-acp".into(), + "node_modules/@zed-industries/claude-agent-acp/dist/index.js".into(), + Some("0.17.0".parse().unwrap()), status_tx, new_version_available_tx, fs, @@ -1449,26 +1449,8 @@ impl ExternalAgentServer for LocalClaudeCode { ) .await?; command.env = Some(env); - let login = command - .args - .first() - .and_then(|path| { - path.strip_suffix("/@zed-industries/claude-code-acp/dist/index.js") - }) - .map(|path_prefix| task::SpawnInTerminal { - command: Some(command.path.to_string_lossy().into_owned()), - args: vec![ - Path::new(path_prefix) - .join("@anthropic-ai/claude-agent-sdk/cli.js") - .to_string_lossy() - .to_string(), - "/login".into(), - ], - env: command.env.clone().unwrap_or_default(), - label: "claude /login".into(), - ..Default::default() - }); - (command, login) + + (command, None) }; command.env.get_or_insert_default().extend(extra_env); diff --git a/docs/src/ai/external-agents.md b/docs/src/ai/external-agents.md index 81f32e99a19e35a42ff522e69539d14b3ca3b14b..3b1ddef858d453b2aacb9781d9ca4598e378d646 100644 --- a/docs/src/ai/external-agents.md +++ b/docs/src/ai/external-agents.md @@ -72,8 +72,8 @@ And to give it context, you can @-mention files, recent threads, symbols, or fet ## Claude Code -Similar to Gemini CLI, you can also run [Claude Code](https://www.anthropic.com/claude-code) directly via Zed's [agent panel](./agent-panel.md). -Under the hood, Zed runs Claude Code and communicate to it over ACP, through [a dedicated adapter](https://github.com/zed-industries/claude-code-acp). +Similar to Gemini CLI, you can also run [Claude Agent](https://platform.claude.com/docs/en/agent-sdk/overview) directly via Zed's [agent panel](./agent-panel.md). +Under the hood, Zed runs the Claude Agent SDK, which runs Claude Code under the hood, and communicates to it over ACP, through [a dedicated adapter](https://github.com/zed-industries/claude-agent-acp). ### Getting Started @@ -101,7 +101,7 @@ Then, run `/login`, and authenticate either via API key, or via `Log in with Cla #### Installation -The first time you create a Claude Code thread, Zed will install [@zed-industries/claude-code-acp](https://github.com/zed-industries/claude-code-acp). +The first time you create a Claude Agent thread, Zed will install [@zed-industries/claude-agent-acp](https://github.com/zed-industries/claude-agent-acp). This installation is only available to Zed and is kept up to date as you use the agent. Zed will always use this managed version of the Claude Code adapter, which includes a vendored version of the Claude Code CLI, even if you have it installed globally.