fix(windows): hide LSP server + installer console flashes under editor hosts (salvage #47971) - #70263
Merged
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on 3db11c1 ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job1 visual diff. inline evidence upload failed. Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso) |
…r subprocesses Salvaged from PR #47971 (LSP subset). On Windows, .cmd-wrapped language servers (e.g. pyright-langserver.CMD launched via cmd.exe /c) and the npm/go/pip LSP auto-installers spawn without CREATE_NO_WINDOW, so a console window flashes whenever the spawn happens under a console-less parent — e.g. a VS Code/Zed extension host running the ACP adapter. - agent/lsp/client.py::_spawn: pass creationflags=windows_hide_flags() to the language-server asyncio subprocess (inert 0 on POSIX; start_new_session is kept — it is POSIX-only and ignored on Windows). - agent/lsp/install.py: same flags on the npm and go installer subprocess.run calls. The pip path goes through hermes_cli.tools_config._pip_install, which already hides its windows. Adapted from the PR's hand-rolled _NO_WINDOW constant to the repo's hermes_cli._subprocess_compat.windows_hide_flags() convention.
…o installers Regression tests for the #47971 salvage: the LSP language-server spawn must pass windows_hide_flags() creationflags while keeping PIPE stdio and start_new_session, and the npm/go LSP auto-installer subprocess.run calls must carry the same hide flags with DEVNULL stdin and capture_output intact.
teknium1
force-pushed
the
salvage/47971-lsp-hide-flags
branch
from
July 23, 2026 23:24
c19de05 to
3db11c1
Compare
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.
Summary
Salvages the still-live subset of PR #47971 by @hellofrommorgan: hides console flashes from the LSP language-server spawn and the npm/go installer spawns — the one flash class still reachable after the #70205 hidden-console daemon fix, because these run in-process under console-less editor extension hosts (VS Code/Zed via the ACP adapter), a parent Hermes doesn't launch.
Changes
agent/lsp/client.py::_spawn:creationflags=windows_hide_flags()on the language-server spawn (kept main'sstart_new_session=True— POSIX-only, compatible)agent/lsp/install.py: hide flags on the npm + go installer spawnstests/test_windows_subprocess_no_window_flags.py: +3 regression tests (ours), following the file's mocked-subprocess patternScope discipline vs the original PR: dropped
coding_context.py/context_references.py/checkpoint_manager.pyhunks (already fixed on main viabounded_git_probe/ existing flags), dropped the pip-path hunk (routes through_pip_installwhich already applies flags internally — the PR's kwargs would have crashed it), dropped thenearest_rootcache (separate perf review), and converted the hand-rolled_NO_WINDOWconstant to the repo'swindows_hide_flags()helper.Validation
test_windows_subprocess_no_window_flags.py+tests/agent/lsp/Authorship preserved via cherry-pick; rebase-merge.
Closes #47971.
Infographic