Skip to content

OpenCode provider: second message fails with "JSON-RPC input closed" #680

@tvtjr

Description

@tvtjr

Environment:

  • Claudian v2.0.16
  • OpenCode CLI v1.15.6
  • Windows
    Bug:
  1. Select OpenCode provider with model opencode/deepseek-v4-flash-free
  2. First message works normally (responds in ~9s)
  3. Second message immediately fails with Error: JSON-RPC input closed (~1s)
  4. Model discovery works fine (11 models discovered)
  5. No errors in Obsidian developer console
    Analysis (provided by OpenCode CLI during debugging):
    The error originates from AcpJsonRpcTransport at line 73038-73040 when the subprocess stdout closes. The ACP protocol itself is stable — directly tested opencode acp from Node.js and multi-turn conversations work perfectly. The subprocess stays alive through initialize, session creation, prompt, cancel, and second prompt.
    The issue appears to be on the plugin side: something calls cleanup() or shutdownProcess() between turns, killing the ACP subprocess before the second prompt can be sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions