github mksglu/context-mode v1.0.165

4 hours ago

context-mode v1.0.165

A reliability follow-up to v1.0.164: two community-reported, platform-specific first-run defects — an orphaned-process CPU spin on Linux and an every-session install failure on Windows.

Bug fixes

  • Linux: orphaned MCP servers no longer busy-spin at ~100% CPU after the client exits (#862, reported by @elhoim). On Linux, start.mjs re-execs itself under Bun to take the crash-safe SQLite path (#564); the node proxy forwards stdin to the Bun child. Its stdin-EOF handler was a no-op and the proxy parked forever, so when the MCP client exited the proxy never closed the child's stdin nor exited — the child's parent stayed alive (defeating its ppid watchdog) and its stdin never reached EOF, leaving an orphaned pair pinned to a CPU core indefinitely. The proxy now propagates client death: it forwards EOF to the child for a graceful self-reap, then escalates SIGTERMSIGKILL so a wedged child can never outlive its client. The Bun re-exec is unchanged.

  • Windows: the boot-time fetch-dependency install no longer fails with EPERM (and no longer flashes a console window) every session (#861, reported by @lravizzoni). The background install of the optional ctx_fetch_and_index dependencies spawned npm with shell: true, which on Windows drops the cwd option — so npm install ran in C:\Windows, hit EPERM creating C:\Windows\node_modules, and flashed a cmd.exe window on every MCP boot. context-mode now invokes npm's CLI through node directly (shell: false, which honors cwd, with the console window suppressed), falling back to the npm shim only where that CLI can't be located. Install failures are now surfaced to stderr instead of being silently swallowed.

Contributors

Thanks to @elhoim and @lravizzoni for precise reports with reproductions — process thread states and npm debug logs respectively — that made both root causes unambiguous, and to @ken-jo for triage on the Windows report.

Install

npx skills add mksglu/context-mode

Existing installs: /context-mode:ctx-upgrade.

Links

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.