Bound win-deskutils sessionDispatch child wait to 10s - #154
Merged
Conversation
The per-session helper (agent.exe -b64exec) can hang forever on some Windows VMs; the unbounded waitExit() then wedges the agent's event loop — control channel starves, server disconnects, reconnects fail. Same fix has shipped in the meshagent binary-embedded copy since April; the server-pushed core copy overrides it at runtime, reintroducing the hang. On timeout callers already catch and skip the session. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mikhailm-coder
enabled auto-merge (squash)
August 27, 2026 19:00
denys-gif
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A qa Windows device's mesh agent wedges seconds after every start: the core's idle-time poll (
idle.getSecondsAllSessions(), present in the server-pushed core but not in the old frozen disk core) callssessionDispatch()per active session, which spawns anagent.exe -b64exechelper and blocks in unboundedchild.waitExit(). On that VM the helper hangs forever → the agent's single-threaded event machinery blocks → heartbeats starve → server closes the control channel (~18 min) → the agent's own reconnect dials fail at TLS while the box's network is fine. Killing the hung child just advances to the next spawn-and-wedge. Any Windows machine with a hang-prone session can hit this.The identical fix (
waitExit(10000)) has existed in the meshagent repo'smodules/win-deskutils.js(and its binary-embedded blob) since April — but the server-pushed core's copy overrides the binary's at runtime, so the unbounded version is what executes post-migration.What
One line in
agents/modules_meshcore/win-deskutils.js:child.waitExit()→child.waitExit(10000). On timeout theexitCode != 0path throws and the per-sessiontry/catchinidle_getSecondsAllSessionsskips that session — the poll resolves and the agent keeps running. Precedent for bounded waits:sysinfo.jsuseswaitExit(2000)/waitExit(5000).Rollout
latestimage → dev/OSS auto-roll (keel); agents pick up the fixed core on reconnect via the standard push.0.0.28release dispatch + values bumps (qa first — the affected device is there).🤖 Generated with Claude Code