ACP spec violation: non-JSON output written to stdout #9350

Closed
opened 2026-02-16 18:12:14 -05:00 by yindo · 5 comments
Owner

Originally created by @ignatov on GitHub (Feb 14, 2026).

Originally assigned to: @rekram1-node on GitHub.

Problem

When running opencode as an ACP agent via stdio transport, it writes non-JSON database migration log lines to stdout. This violates the ACP specification, which requires that only valid JSON-RPC messages are written to stdout.

Example of the non-JSON output observed on stdout:

[database migration logs, startup messages, etc.]

This causes ACP clients to fail when parsing the stdout stream, since they expect every line to be a valid JSON-RPC message.

Reproduce

./opencode acp

Impact

  • opencode has been quarantined in the ACP registry because it breaks automated verification (verify_agents.py --auth-check)
  • ACP clients that connect to opencode over stdio will encounter parse errors

Expected behavior

All non-JSON-RPC output (logs, diagnostics, migration messages) should be written to stderr, not stdout. Only valid JSON-RPC messages should appear on stdout when running in ACP/stdio mode.

Environment

  • opencode v1.2.x
  • Running via ACP stdio transport
Originally created by @ignatov on GitHub (Feb 14, 2026). Originally assigned to: @rekram1-node on GitHub. ## Problem When running opencode as an ACP agent via stdio transport, it writes non-JSON database migration log lines to stdout. This violates the ACP specification, which requires that only valid JSON-RPC messages are written to stdout. Example of the non-JSON output observed on stdout: ``` [database migration logs, startup messages, etc.] ``` This causes ACP clients to fail when parsing the stdout stream, since they expect every line to be a valid JSON-RPC message. ## Reproduce ```bash ./opencode acp ``` ## Impact - opencode has been quarantined in the [ACP registry](https://github.com/agentclientprotocol/registry/pull/71) because it breaks automated verification (`verify_agents.py --auth-check`) - ACP clients that connect to opencode over stdio will encounter parse errors ## Expected behavior All non-JSON-RPC output (logs, diagnostics, migration messages) should be written to **stderr**, not stdout. Only valid JSON-RPC messages should appear on stdout when running in ACP/stdio mode. ## Environment - opencode v1.2.x - Running via ACP stdio transport
yindo closed this issue 2026-02-16 18:12:14 -05:00
Author
Owner

@rekram1-node commented on GitHub (Feb 15, 2026):

Yeah thats no good will fix.

@rekram1-node commented on GitHub (Feb 15, 2026): Yeah thats no good will fix.
Author
Owner

@ignatov commented on GitHub (Feb 15, 2026):

@rekram1-node great! Please ping me when the next update is going to be ready, I'll update the acp registry

@ignatov commented on GitHub (Feb 15, 2026): @rekram1-node great! Please ping me when the next update is going to be ready, I'll update the acp registry
Author
Owner

@rekram1-node commented on GitHub (Feb 15, 2026):

@ignatov I'll release it shortly.

@rekram1-node commented on GitHub (Feb 15, 2026): @ignatov I'll release it shortly.
Author
Owner

@rekram1-node commented on GitHub (Feb 15, 2026):

Alright I cut a release, should be out in next 10-20 min. Also I will add some e2e tests for acp to prevent this in the future.

@rekram1-node commented on GitHub (Feb 15, 2026): Alright I cut a release, should be out in next 10-20 min. Also I will add some e2e tests for acp to prevent this in the future.
Author
Owner

@ignatov commented on GitHub (Feb 15, 2026):

yay!

@ignatov commented on GitHub (Feb 15, 2026): yay!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9350