anomalyco / anomalyco/opencode
Local MCP server subprocess launch (Playwright) hangs forever when hosted by Desktop, works fine from a terminal
@Hona is already working on this.
Since Aug 13, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
A local MCP server that spawns a subprocess internally (in my case Python + Playwright, launching a Node driver + Chromium) hangs forever when the tool is called through OpenCode Desktop, but the exact same code and profile works correctly when run directly from a terminal.
When hosted by Desktop: the call that should spawn the subprocess never produces any child process at all (pgrep -P <server-pid> returns zero children for 10+ minutes) and never hits its own internal timeout, even though that timeout is a plain asyncio.wait_for. A stack sample (sample <pid>) of the hung process shows every thread idle (asyncio event loop idle, stdio reader idle) - nothing anywhere near the subprocess-launch code.
Running the identical script directly in a terminal (not through OpenCode) spawns the subprocess immediately and completes normally.
Ruled out: Gatekeeper/quarantine on the subprocess binary, macOS App Sandbox on OpenCode.app, missing binaries, broken PATH/env, zombie/reaped children.
Points to something about how Desktop hosts local MCP server processes (child of the Electron "OpenCode Helper (Utility)" process) blocking subprocess creation from within that process.
Plugins
No response
OpenCode version
1.15.13
Steps to reproduce
- Configure a local stdio MCP server that internally spawns a subprocess (e.g. Python asyncio.create_subprocess_exec, or Playwright's driver)
- Launch it through OpenCode Desktop
- Call the tool that spawns the subprocess
- Observe: no child process ever appears under the server's PID, call hangs past its own timeout
- Run the identical code directly from a terminal - subprocess spawns immediately, works fine
Screenshot and/or share link
No response
Operating System
macOS 26.5.2
Terminal
N/A (Desktop app)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.