Skip to content

fix(web): hide intermediate cmd.exe when opening profile terminal - #66612

Closed
stantheman0128 wants to merge 1 commit into
NousResearch:mainfrom
stantheman0128:fix/win-open-terminal-hide
Closed

fix(web): hide intermediate cmd.exe when opening profile terminal#66612
stantheman0128 wants to merge 1 commit into
NousResearch:mainfrom
stantheman0128:fix/win-open-terminal-hide

Conversation

@stantheman0128

Copy link
Copy Markdown
Contributor

What does this PR do?

Hide the intermediate cmd.exe console flash when the portal opens a profile setup terminal on Windows. start still opens a visible terminal for the user.

Credit: Stan Shih (stantheman0128)

Related Issue

Unfiled Windows footgun found while auditing open-terminal against windows_hide_flags() coverage.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/web_server.py: pass creationflags=windows_hide_flags() to the Windows open-terminal Popen
  • tests/hermes_cli/test_web_server.py: assert creationflags on the Windows path

How to Test

  1. python -m pytest tests/hermes_cli/test_web_server.py::TestNewEndpoints::test_profile_open_terminal_uses_windows_cmd -q
  2. Live: CREATE_NO_WINDOW Popen of cmd.exe /c start /b ... returns exit 0

Checklist

Code

  • I've read the Contributing Guide
  • Conventional Commits
  • Searched existing PRs (no open PR for this open-terminal site)
  • PR contains only related changes
  • Targeted pytest passed (2/2 open-terminal tests)
  • Added/updated tests
  • Tested on Windows 11

Documentation & Housekeeping

  • N/A docs
  • N/A config
  • Cross-platform: POSIX paths unchanged; Windows-only creationflags

AI assistance

Prepared with Cursor (Grok). Human reviewed.

Evidence

python -m pytest ...test_profile_open_terminal_uses_windows_cmd ...macos... -q
..  2 passed in 6.21s

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard platform/windows Native Windows-specific behavior or breakage P3 Low — cosmetic, nice to have sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Jul 18, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved with Comment

PR #66612fix(web): hide intermediate cmd.exe when opening profile terminal

  • Hides intermediate cmd.exe window when opening profile terminal on Windows.
  • 20 additions, 4 deletions — targeted Windows UX fix.
  • No security concerns.

Reviewed by Hermes Agent

@teknium1 teknium1 added sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users area/profiles Multi-profile isolation, HERMES_HOME scoping labels Jul 18, 2026
Stan Shih (stantheman0128)

Pass windows_hide_flags() to the Windows open-terminal Popen so the
wrapper console does not flash; start still opens a visible terminal.

Co-authored-by: Cursor <cursoragent@cursor.com>
@stantheman0128
stantheman0128 force-pushed the fix/win-open-terminal-hide branch 3 times, most recently from c211e19 to 792aa0f Compare July 23, 2026 08:15
@teknium1

Copy link
Copy Markdown
Contributor

Closing after the class-level fix in PR #70205 (commit 0dbf639): Windows console flashes were caused by Hermes daemons running console-less (pythonw / DETACHED_PROCESS parents), forcing every console-subsystem child to allocate its own visible window. Main now launches every daemon (gateway, Scheduled Task, UAC handoff, dashboard, desktop backend) with a hidden console that all descendants inherit — so the spawn sites this PR flags no longer have a reachable flash under any shipped launch path (interactive terminals never flashed; children inherit the visible console there).

The sites you patched were genuinely unflagged, and the diagnosis was sound against the old launch topology — the ground just moved under it. Rather than keep growing per-site flags across an unbounded set of leaf spawns, we're standardizing on the parent-console fix. If a flash reappears on current main under a shipped launch path, that's a new bug — please file it with the flashing process name.

Thanks for the contribution and the Windows attention; sorry this one got mooted at the root.

@teknium1 teknium1 closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users 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.

4 participants