• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    How do I use Claude Code as an agent in Zed via Agent Client Protocol (ACP)?

    A developer wants to use Claude Code inside the Zed editor through the Agent Client Protocol instead of the terminal. Claude Code has no built-in ACP server command, so they look for a working setup. Some users report the adapter crashing once a prompt is sent.

    Originally asked on GitHub: https://github.com/anthropics/claude-code/issues/6686

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: not supported natively. The feature request for a built-in claude acp serve command was closed as NOT_PLANNED. Commenters instead use the community adapter @zed-industries/claude-code-acp, which runs Claude Code as an ACP agent over stdio.

      Steps commenters reported for Zed:

      1. Install the adapter globally: npm i -g @zed-industries/claude-code-acp
      2. Add this to Zed's settings:
      json
      "agent_servers": {
        "claude-code-acp": {
          "command": "claude-code-acp"
        }
      }
      
      1. The agent then appears in Zed's agent list.

      Another user installed the package locally in a project and pointed command to node with the path to node_modules/@zed-industries/claude-code-acp/dist/index.js.

      Known problems in the thread:

      • One user saw the process crash when sending a prompt, while session initialization worked.
      • Adding files as context could trigger a "Prompt is too long" error.
      • A path problem in the bundled @anthropic-ai/claude-code package broke the adapter for one user. That user patched the installed sdk.mjs to change the cli.js path from entrypoints to claude-code. This edit is lost on reinstall. A bug report was opened upstream at anthropics/claude-code#6867.

      General advice: pin versions and check the adapter's repository for updates, since this path is unofficial.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @radiosilence tried on GitHub (Worked)

      Installed the adapter with npm i @zed-industries/claude-code-acp in a local project and set Zed's agent_servers entry to run node on its dist/index.js.

      Source: https://github.com/anthropics/claude-code/issues/6686#issuecomment-3236443090 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @scotteveritt tried on GitHub (Partly worked)

      Installed globally with npm i -g @zed-industries/claude-code-acp and set Zed's agent_servers to run the claude-code-acp command. The agent appeared in Zed, with some bugs when adding file context.

      Source: https://github.com/anthropics/claude-code/issues/6686#issuecomment-3237610121 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @szhongren tried on GitHub (Partly worked)

      Patched the installed sdk.mjs in the adapter's node_modules, changing the cli.js path from entrypoints to claude-code. The commenter described this as a temporary workaround that lasts until reinstall.

      Source: https://github.com/anthropics/claude-code/issues/6686#issuecomment-3238888399 (opens external site)

      Did this work for you?

    Add your answer or comment