mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-04 12:33:08 +00:00
The recurring Windows desktop console-flash bug (#54220) is governed by the *parent's* console, not by each child spawn. The desktop backend was launched as GUI-subsystem pythonw.exe, which has no console at all — so every console-subsystem child it spawns (git, gh, cmd, wmic, powershell, ...) had to allocate its own console, flashing a window. That is why the fix had become an endless per-call-site sweep of CREATE_NO_WINDOW flags: each leaf spawn was papering over a missing console on the root. Launch the backend as the venv's console python.exe instead. Under the existing hiddenWindowsChildOptions() wrapper (windowsHide: true -> CREATE_NO_WINDOW) the backend owns a single *windowless* console, and every descendant spawn inherits it instead of allocating a visible one. This makes "no flashing windows" a property of the one backend launch rather than a flag that must be remembered at every spawn site — including spawns inside third-party libraries that no call-site sweep can reach. Verified on Windows 11 25H2 (Windows Terminal default): with the per-site hide flag forcibly neutered, the canonical culprits (git/gh/cmd/wmic/powershell) spawned naively and none flashed, while the same naive spawn from the old console-less pythonw parent did flash — isolating the parent console as the cause. Two premises behind the old pythonw approach did not hold up on current Windows and are dropped here: - The venv Scripts\python.exe uv shim, under CREATE_NO_WINDOW, re-execs base python *windowless* — it does not flash a conhost (the #52239 concern), so the base-pythonw detour is unnecessary. - Console python restores stdout, so the backend announces its port on the normal HERMES_DASHBOARD_READY stdout line; the pythonw-only ready-file side channel is no longer needed and the readyFile opt-in is removed. Removes the now-dead pythonw machinery (getNoConsoleVenvPython, toNoConsolePython, applyWindowsNoConsoleSpawnHints, readVenvHome) and updates the test to assert the new invariant: backend command is never pythonw, both backend spawns still go through hiddenWindowsChildOptions, and no backend opts into the ready-file path. Scope: this fixes the high-frequency backend-descendant flash classes. The updater/UAC handoff (#54543) and embedded-terminal PTY accumulation (#53555) classes have separate root causes and are unaffected. |
||
|---|---|---|
| .. | ||
| backend-command.cjs | ||
| backend-command.test.cjs | ||
| backend-env.cjs | ||
| backend-env.test.cjs | ||
| backend-probes.cjs | ||
| backend-probes.test.cjs | ||
| backend-ready.cjs | ||
| backend-ready.test.cjs | ||
| bootstrap-platform.cjs | ||
| bootstrap-platform.test.cjs | ||
| bootstrap-runner.cjs | ||
| bootstrap-runner.test.cjs | ||
| connection-config.cjs | ||
| connection-config.test.cjs | ||
| dashboard-token.cjs | ||
| dashboard-token.test.cjs | ||
| desktop-uninstall.cjs | ||
| desktop-uninstall.test.cjs | ||
| embed-referer.cjs | ||
| entitlements.mac.inherit.plist | ||
| entitlements.mac.plist | ||
| fs-read-dir.cjs | ||
| fs-read-dir.test.cjs | ||
| gateway-ws-probe.cjs | ||
| gateway-ws-probe.test.cjs | ||
| git-repo-scan.cjs | ||
| git-review-ops.cjs | ||
| git-review-ops.test.cjs | ||
| git-root.cjs | ||
| git-root.test.cjs | ||
| git-worktree-ops.cjs | ||
| git-worktree-ops.test.cjs | ||
| hardening.cjs | ||
| hardening.test.cjs | ||
| link-title-window.cjs | ||
| link-title-window.test.cjs | ||
| main.cjs | ||
| oauth-net-request.cjs | ||
| oauth-net-request.test.cjs | ||
| preload.cjs | ||
| session-windows.cjs | ||
| session-windows.test.cjs | ||
| titlebar-overlay-width.cjs | ||
| titlebar-overlay-width.test.cjs | ||
| update-count.cjs | ||
| update-count.test.cjs | ||
| update-marker.cjs | ||
| update-marker.test.cjs | ||
| update-rebuild.cjs | ||
| update-rebuild.test.cjs | ||
| update-relaunch.cjs | ||
| update-relaunch.test.cjs | ||
| update-remote.cjs | ||
| update-remote.test.cjs | ||
| vscode-marketplace.cjs | ||
| vscode-marketplace.test.cjs | ||
| window-state.cjs | ||
| window-state.test.cjs | ||
| windows-child-process.test.cjs | ||
| windows-hermes-resolution.test.cjs | ||
| windows-user-env.cjs | ||
| windows-user-env.test.cjs | ||
| workspace-cwd.cjs | ||
| workspace-cwd.test.cjs | ||
| wsl-clipboard-image.cjs | ||
| wsl-clipboard-image.test.cjs | ||