Skip to content

fix(mcp): arm liveness watchdog in local proxy - #979

Closed
snvtac wants to merge 1 commit into
colbymchenry:mainfrom
snvtac:snvtac/943-mcp-restart-loop-process-exhaustion
Closed

snvtac wants to merge 1 commit into
colbymchenry:mainfrom
snvtac:snvtac/943-mcp-restart-loop-process-exhaustion

Conversation

@snvtac

@snvtac snvtac commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Arm the existing main-thread liveness watchdog in the MCP local-handshake proxy, matching direct and detached-daemon modes.
  • Stop the watchdog during normal proxy shutdown so clean stdin/ppid exits do not leave watchdog children alive.
  • Cover the real proxy path in the daemon integration test by asserting that the proxy arms the watchdog.

Fixes

Fixes #943

Notes

This is intentionally scoped to event-loop/main-thread liveness in CodeGraph's MCP runtime. It does not add request-level daemon timeouts, change shared-daemon ownership, or attempt to control Codex/Volta supervisor behavior.

Verification

  • npm run build
  • npx vitest run __tests__/mcp-daemon.test.ts
  • npm test (103 files passed; 1703 passed, 3 skipped)

colbymchenry added a commit that referenced this pull request Sep 27, 2026
* fix(mcp): arm liveness watchdog in local proxy

* fix(mcp): terminate wedged local proxies with watchdog (#943)

Install the independent liveness watchdog in the local handshake proxy and stop it during shutdown.
Build on PR #979 while preserving existing daemon assertions.
Add process-termination, slow fallback, and watchdog cleanup coverage.
Validate the repro and targeted tests on Windows, macOS, and Linux.

Co-authored-by: Haoqian Li <haoqian.li@finalroundai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Haoqian Li <haoqian.li@finalroundai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@colbymchenry

Copy link
Copy Markdown
Owner

Thanks @snvtac! Your commits here were carried into #2049 (authorship preserved), with a few follow-up changes from review, and that is now merged. Closing this one in favour of it. It will be in the next release.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP restart loop spawns unlimited volta.exe processes causing resource exhaustion

2 participants