You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v2 service crash-loops on EPIPE when a local MCP command dies instantly #43257
If a local MCP server in config points at a command that exits immediately (in my case a bun run --cwd <dir that no longer exists> start entry), the v2 background service crashes on startup with an uncaught EPIPE: broken pipe, send. The client keeps respawning it, so the TUI is stuck showing "restarting service" forever and v2 is unusable until the MCP entry is removed by hand.
The EPIPE comes from flushing the MCP initialize frame into the dead child's stdin. It surfaces asynchronously through the stream's destroy path after the stdin sink has already completed, so nothing is listening for the error event on proc.stdin and it takes down the whole process:
EPIPE: broken pipe, send
syscall: "send",
errno: -32,
code: "EPIPE"
at end (unknown:1:1)
at internal:fs/streams:402:23
at _destroy (internal:streams/destroy:63:18)
...
Reproduces on the Bun 1.4 runtime that the v2 binary ships with; Bun 1.3.14 doesn't surface the late EPIPE.
Plugins
No response
OpenCode version
v0.0.0-beta-17595
Steps to reproduce
Add a local MCP server whose command dies instantly, e.g. "command": ["bun", "run", "--cwd", "/nonexistent/dir", "start"]
Launch the v2 TUI
Service exits 1 with the EPIPE above; TUI loops on "restarting service"
Activity
github-actions commentedon Aug 18, 2026
This issue might be a duplicate of or related to an existing issue. Please check:
If you've already reviewed #33653 and confirmed this is distinct, feel free to disregard.
github-actions commentedon Oct 20, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.