Skip to content

ACP server JSON-RPC id field type mismatch with Zed editor #1696

@alvin1

Description

@alvin1

Description

DeepSeek TUI ACP server JSON-RPC response uses integer id field, which causes compatibility issues with the Zed editor ACP client (v1.2.6+). Zed expects id to be a string type.

Environment

  • DeepSeek TUI version: 0.8.37
  • Zed version: 1.2.6+stable
  • OS: WSL2 (Ubuntu 24.04) / Windows client
  • Integration method: deepseek-tui serve --acp via wsl.exe

Steps to Reproduce

  1. Start the ACP server in WSL:

    deepseek-tui serve --acp
    
  2. Configure Zed context server:

    {
      "context_servers": {
        "deepseek-tui": {
          "command": "wsl.exe",
          "args": [
            "-d",
            "Ubuntu-24.04",
            "/path/to/deepseek-tui",
            "serve",
            "--acp"
          ]
        }
      }
    }
  3. Observe the error in Zed's MCP server panel:

    invalid type: integer `1`, expected a string at line 1 column 20
    

Root Cause

The ACP server's initialize response returns "id": 1 (integer):

{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":1,...}}

Zed's ACP client requires id to be a string type. While JSON-RPC 2.0 allows string, number, or null for id, Zed only accepts string.

Expected Behavior

ACP server should return "id": "1" (string) instead of "id": 1 (integer) in all JSON-RPC responses.

Workaround

Using deepseek-tui serve --http --port 8799 --insecure with an OpenAI-compatible HTTP client works as an alternative, but the native ACP integration would be more seamless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions