[PR #11303] feat: let ACP client expose the input/output properly #13733

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

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

State: open
Merged: No


What does this PR do?

Fixes https://github.com/anomalyco/opencode/issues/10998.

Old behavior: we sent a tool_call at pending with kind: "execute". As the tool ran, updates carried the content plus a completed rawOutput. Zed relied on kind: "execute" to render the blue “run command” box, but the actual command (rawInput) only appeared after completion, so you couldn’t see what was running.

New behavior: we now emit the first tool_call at running with full rawInput (command + cwd), and finish with rawOutput (stdout/stderr). Also we currently set kind: "other", which is why the blue box styling no longer appears. And we can see rawInput and rawOutput as collapsible with that.

How did you verify your code works?

By running Zed's ACP inferface via:

    "OpenCode (ACP Dev)": {
      "type": "custom",
      "command": "bun",
      "args": [
        "run",
        "--cwd",
        "/Users/validate/Developer/personal/opencode/packages/opencode",
        "--conditions=browser",
        "./src/index.ts",
        "acp",
      ],
      "env": {},
    },

Screenshot

Old Behavior

CleanShot 2026-01-30 at 01 21 56@2x

New Behavior

CleanShot 2026-01-30 at 13 57 36@2x
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11303 **State:** open **Merged:** No --- ### What does this PR do? Fixes https://github.com/anomalyco/opencode/issues/10998. Old behavior: we sent a `tool_call` at `pending` with `kind: "execute"`. As the tool ran, updates carried the content plus a completed `rawOutput`. Zed relied on `kind: "execute"` to render the blue “run command” box, but the actual command (`rawInput`) only appeared after completion, so you couldn’t see what was running. New behavior: we now emit the first `tool_call` at `running` with full `rawInput` (command + `cwd`), and finish with `rawOutput` (stdout/stderr). Also we currently set `kind: "other"`, which is why the blue box styling no longer appears. And we can see `rawInput` and `rawOutput` as collapsible with that. ### How did you verify your code works? By running Zed's ACP inferface via: ``` "OpenCode (ACP Dev)": { "type": "custom", "command": "bun", "args": [ "run", "--cwd", "/Users/validate/Developer/personal/opencode/packages/opencode", "--conditions=browser", "./src/index.ts", "acp", ], "env": {}, }, ``` ### Screenshot #### Old Behavior <img width="1256" height="1302" alt="CleanShot 2026-01-30 at 01 21 56@2x" src="https://github.com/user-attachments/assets/2826681c-ae8d-4793-a8c2-1240bed210d9" /> #### New Behavior <img width="1295" height="1855" alt="CleanShot 2026-01-30 at 13 57 36@2x" src="https://github.com/user-attachments/assets/63a48b96-8e5d-4dc2-b073-c1d8ae1ceac7" />
yindo added the pull-request label 2026-02-16 18:18:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13733