You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Orphan reaping can force-kill an unrelated process tree that reused a recorder pid #284
Startup reaping and cross-restart stop identify the recorder only by image name (tasklist). #185 added a start-time check for the server-owner pid, but not for the recorder pid. For WGC sessions the expected image is node.exe, so any Node process that reuses the pid is killed with taskkill /T /F.
Where
src/utils/sessions.ts:219-221 (expectedImage returns node.exe for wgc)
No recorder creation time is stored on SessionRecord. The WGC recorder exits on its own when its stdin closes (src/wgcRecorder.ts:187), so after a hard server death its pid is always free for reuse. A later node.exe with that pid (editor helpers, other MCP servers) passes the image check.
Impact
One server start after a crash during a WGC recording can kill an unrelated Node process and everything it spawned.
Steps to reproduce
Start a wgc recording
Kill the server hard (taskkill /F)
Start Node processes until one gets the recorder's old pid
Restart the server: reapOrphans kills that process tree
Suggested fix
Record the recorder's creation time at spawn (processInfo(child.pid)), store it on the record, and require a match within OWNER_START_SLACK_MS before killing, as isSameServer does. Drop /T when killing a stored pid.
Acceptance criteria
Recorder start time stored on the session record
Reap/stop refuse to kill a pid whose start time does not match
Test: a live non-recorder process with a matching image name is not killed
Fixed in 2b588ec: records now store pidSpawnedAt (start and resume), and isOwnRecorder requires the running process to match the image and not be newer than the spawn before reapOrphans or the cross-restart runStop kill it. The tree kill (/T) stays, since the real WGC recorder's ffmpeg children must go too; it now only runs on a verified recorder. Verified with pure isSameRecorder tests and a Windows test that a live node.exe started after the record's spawn time is not claimed.
Activity
TMHSDigital commentedon Nov 10, 2026
Fixed in 2b588ec: records now store
pidSpawnedAt(start and resume), andisOwnRecorderrequires the running process to match the image and not be newer than the spawn beforereapOrphansor the cross-restartrunStopkill it. The tree kill (/T) stays, since the real WGC recorder's ffmpeg children must go too; it now only runs on a verified recorder. Verified with pureisSameRecordertests and a Windows test that a live node.exe started after the record's spawn time is not claimed.chore: release 0.48.2
test(lifecycle): stop force-kill and cross-restart paths (#299)