[PR #13385] feat: ACP over WebSocket at /acp and opencode acp-websocket command #14641

Open
opened 2026-02-16 18:19:25 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13385

State: open
Merged: No


Closes #13388
Exposes the Agent Client Protocol (ACP) over WebSocket so it can be used from other hosts on the network.

  • Endpoint: GET /acp (WebSocket upgrade). Uses the directory OpenCode was started from; override via ?directory=... or x-opencode-directory header.
  • CLI: opencode acp-websocket starts the server with the same options as serve and prints the ACP WebSocket URL.
  • Route: New AcpRoutes in packages/opencode/src/server/routes/acp.ts, mounted at /acp on the existing server (port 4096).
  • Test: bun run script/test-acp-websocket.ts for manual verification.

Protocol is unchanged (JSON-RPC 2.0, newline-delimited); only the transport is WebSocket instead of stdio.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13385 **State:** open **Merged:** No --- Closes #13388 Exposes the Agent Client Protocol (ACP) over WebSocket so it can be used from other hosts on the network. - **Endpoint:** `GET /acp` (WebSocket upgrade). Uses the directory OpenCode was started from; override via `?directory=...` or `x-opencode-directory` header. - **CLI:** `opencode acp-websocket` starts the server with the same options as `serve` and prints the ACP WebSocket URL. - **Route:** New `AcpRoutes` in `packages/opencode/src/server/routes/acp.ts`, mounted at `/acp` on the existing server (port 4096). - **Test:** `bun run script/test-acp-websocket.ts` for manual verification. Protocol is unchanged (JSON-RPC 2.0, newline-delimited); only the transport is WebSocket instead of stdio.
yindo added the pull-request label 2026-02-16 18:19:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14641