Skip to content

ACP stdio transport crashes on oversized tool_call_update payloads (truncate large text fields) #17019

Closed as not planned

Description

@zztdandan

Description

Describe the bug you encountered

When OpenCode is used with the Agent Client Protocol (ACP) Python SDK over stdio, oversized JSON-RPC update payloads can trigger a fatal stdio channel/port error on the SDK side.
This breaks ACP communication for the current client session.

What happened?

tool_call_update messages may contain very large text fields (for example from read output), and a single emitted JSON message can exceed the practical stdio boundary (~64KB observed in this integration path).
After that, ACP updates may fail with a fatal stdio-side error and the session becomes unstable/unusable.

Plugins

ACP / Agent Client Protocol Python SDK over stdio

OpenCode version

1.2.10

Steps to reproduce

  1. Run OpenCode with ACP Python SDK connected via stdio.
  2. Trigger a tool call that emits large text content in update payloads (e.g. read on a moderately large file, or large rawOutput.output).
  3. Observe ACP update delivery failure / fatal stdio-side error once payload size becomes too large.

Screenshot and/or share link

frame_20260311T012529745579Z_32e0a22071284adfa27899e8ced26c40.txt
frame_20260311T034910517070Z_46893e1cb388476ca5a9cfeb5ee96777.txt
these are two large acp stdio return i catched

Operating System

win11 WSL unbunt 22.04

Terminal

vscode

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 11, 2026
  2. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions