Skip to content

fix(windows): hide LSP server + installer console flashes under editor hosts (salvage #47971) - #70263

Merged
teknium1 merged 2 commits into
mainfrom
salvage/47971-lsp-hide-flags
Jul 24, 2026
Merged

fix(windows): hide LSP server + installer console flashes under editor hosts (salvage #47971)#70263
teknium1 merged 2 commits into
mainfrom
salvage/47971-lsp-hide-flags

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

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's start_new_session=True — POSIX-only, compatible)
  • agent/lsp/install.py: hide flags on the npm + go installer spawns
  • tests/test_windows_subprocess_no_window_flags.py: +3 regression tests (ours), following the file's mocked-subprocess pattern

Scope discipline vs the original PR: dropped coding_context.py / context_references.py / checkpoint_manager.py hunks (already fixed on main via bounded_git_probe / existing flags), dropped the pip-path hunk (routes through _pip_install which already applies flags internally — the PR's kwargs would have crashed it), dropped the nearest_root cache (separate perf review), and converted the hand-rolled _NO_WINDOW constant to the repo's windows_hide_flags() helper.

Validation

Result
test_windows_subprocess_no_window_flags.py + tests/agent/lsp/ 199 passed, 0 failed
A/B (source hunks reverted) exactly the 3 new tests fail
ruff clean

Authorship preserved via cherry-pick; rebase-merge.

Closes #47971.

Infographic

lsp-hide-flags

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 3db11c1

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 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)

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/lsp Language Server Protocol integration (P2 policy) platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Jul 23, 2026
hellofrommorgan and others added 2 commits July 23, 2026 16:24
…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
teknium1 force-pushed the salvage/47971-lsp-hide-flags branch from c19de05 to 3db11c1 Compare July 23, 2026 23:24
@teknium1
teknium1 merged commit 4276fe8 into main Jul 24, 2026
37 checks passed
@teknium1
teknium1 deleted the salvage/47971-lsp-hide-flags branch July 24, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/lsp Language Server Protocol integration (P2 policy) P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants