opencode PR adds regression test for MCP subprocess leak that exhausted memory

sugarless-sweet · ghdev · 2026-09-12

PR #48595 in anomalyco/opencode addresses issue #47727: polling clients interacting via /mcp/:name/connect-style endpoints kept spawning stdio MCP child processes that were never disposed, eventually exhausting memory.

The PR adds regression tests against the instance HttpApi route handlers to lock in the intended lifecycle:

The test fixture is a standard MCP stdio server that appends its pid on every spawn; the test counts live children via process.kill(pid, 0), so any spawned-but-never-disposed process fails the assertion. Verification: new test passed 5/5 runs, full test/server/ suite at 298 pass / 0 fail.

Original post →

More from coding & agent

coding & agent channel →