Skip to content

ACP mode returns empty response when used with WeClaw #31717

Description

@liushaoquan133-collab

Bug Description

When using OpenCode's ACP mode with WeClaw (WeChat AI bridge), the agent returns an empty response for every message.

Steps to Reproduce

  1. Configure WeClaw to use OpenCode as default agent in ACP mode
  2. Start WeClaw: weclaw start
  3. Send any message via WeChat
  4. Response is always: Error: agent returned empty response

Expected Behavior

OpenCode should return the actual AI response content.

Actual Behavior

ACP response only contains metadata without content:
json {"stopReason":"end_turn","_meta":{}}

Logs

[acp] started subprocess (command=opencode.cmd, pid=15668) [acp] sending initialize handshake (pid=15668, protocol=legacy_acp)... [acp] initialized (pid=15668): {"protocolVersion":1,"agentCapabilities":{...},"agentInfo":{"name":"OpenCode","version":"1.15.6"}} [acp] prompt result (session=ses_14df13317ffetKiW7WMFYDNRc4): {"stopReason":"end_turn","_meta":{}} [handler] agent error (...): agent returned empty response

Environment

  • OpenCode: 1.15.6
  • OS: Windows 11
  • WeClaw: 0.7.1
  • Providers: DeepSeek, Xiaomi

Additional Context

  • ACP initialization works correctly
  • The issue is with prompt/response handling - OpenCode processes the request but returns no content
  • Claude CLI mode works fine with WeClaw

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