Skip to content

[Bug] Desktop app spawns every local stdio MCP server twice at session start #41331

Closed

Description

@Ruslanastro

Summary

The opencode desktop app (@opencode-aidesktop, Electron) spawns two copies of every local stdio MCP server at session start. Both copies appear within ~5 seconds of each other, as children of the same OpenCode utility (node) process. Reproduced across two consecutive app restarts.

Environment

  • App: opencode desktop 1.18.15 (C:\Users\rusla\AppData\Local\Programs\@opencode-aidesktop\OpenCode.exe)
  • OS: Windows 11
  • Config: 12 MCP servers in ~/.config/opencode/opencode.json (mix of npx and Python/uvx/binary commands)
  • Reproducible: yes, 2/2 restarts

Evidence (after fresh restart, all timestamps same boot)

Every local MCP server appears in two waves ~5s apart, all under the same app utility process:

OpenCode.exe (main 20748) 0:06:42
 └─ utility node 6588
     ├─ github-mcp-server 25496  0:06:48   (WAVE 1)
     └─ github-mcp-server 21820  0:06:53   (WAVE 2)
     ├─ npx @playwright/mcp@0.0.79 → cli.js ×2
     ├─ npx server-filesystem      → index.js ×2
     ├─ npx server-sequential-thinking → dist/index.js ×2
     └─ (uvx mcp-pandoc also ×2: 22620, 23732)

Same pattern was present in the previous session (1.18.10-era processes), i.e. it persists across versions.

Expected behavior

Each configured MCP server should spawn exactly once per session.

Actual behavior

2 copies per server → double memory (~200–300 MB wasted), and for stateful stdio servers (memory stores writing JSONL/SQLite, browsers holding ports) two live writers create race/corruption risk.

Related

Happy to provide full PID/PPID dumps or run an instrumented build.

Activity

  1. github-actions commented on Aug 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If the underlying cause is the same, it may be worth consolidating. If the desktop Electron path has a distinct code path causing the duplication, that detail would help maintainers triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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