codegraph
codegraph copied to clipboard
【BUG】mcp server do not kill after session idles
opencode use codegraph, but mcp server do not killed after session idle, use too much memory,and make web ui stucks. each workspace spawn serveral mcp server and make much use of mem if you run multiple projection paralel
The most common cause of this on Windows is the orphan-reaping bug just fixed in #711 (merged to main; ships in the next release): when the host process exited, CodeGraph's helper couldn't tell on Windows and kept running, so the shared server was never reaped and memory grew per workspace.
Since the report doesn't list the OS, two cases:
- Windows: this should be fixed — please try the next release.
- macOS/Linux: parent-exit detection already worked there, so a server staying alive would be a different root cause. If it persists after the next release, please reopen with your OS, CodeGraph version, MCP host (you mentioned opencode), and the
.codegraph/daemon.logfrom an affected project — that'll tell us whether it's reaping or something else (e.g. multiple projects each holding their own daemon).
Closing for now as addressed by #711; happy to reopen with those details.