hermes - 💡(How to fix) Fix [Feature]: Hidden Terminal exec on Windows Native

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Windows 11's "Default Terminal" feature intercepts console-subsystem process creation at the OS level, overriding CREATE_NO_WINDOW in many cases. Even with STARTF_USESTDHANDLES (which Microsoft documents as an exception that prevents Windows Terminal from intercepting), popups still occur in practice on this machine.

Root Cause

Root cause: On Windows, Hermes' _run_bash method runs every terminal command by spawning a new bash.exe process (from Git for Windows) via subprocess.Popen. Since Git Bash's bash.exe is a console-subsystem executable, Windows Terminal (registered as the default terminal app on Windows 11) intercepts and opens a new tab for each call.

RAW_BUFFERClick to expand / collapse

Problem or Use Case

Problem: Hermes Agent spawns visible Windows Terminal popup tabs on every terminal tool call.

Root cause: On Windows, Hermes' _run_bash method runs every terminal command by spawning a new bash.exe process (from Git for Windows) via subprocess.Popen. Since Git Bash's bash.exe is a console-subsystem executable, Windows Terminal (registered as the default terminal app on Windows 11) intercepts and opens a new tab for each call.

Why standard suppression flags don't work: Windows 11's "Default Terminal" feature intercepts console-subsystem process creation at the OS level, overriding CREATE_NO_WINDOW in many cases. Even with STARTF_USESTDHANDLES (which Microsoft documents as an exception that prevents Windows Terminal from intercepting), popups still occur in practice on this machine.

Environment:

  • Windows 11
  • Git Bash (no WSL)
  • Windows Terminal set as default terminal application
  • Hermes Agent running as a gateway (Telegram/web)

Proposed Solution

What's needed: A native Windows terminal backend that never spawns a console-subsystem executable for any reason — including the initial PowerShell bootstrap. The solution likely needs to use Windows API calls (e.g., CreateProcess with very specific flag combinations) or avoid spawning console-subsystem processes entirely.

Alternatives Considered

What I tried that didn't fully work:

  • Wrapping via pythonw.exe bridge with CREATE_NO_WINDOW + STARTF_USESHOWWINDOW|SW_HIDE — still popped
  • Fully file-based I/O (zero pipes anywhere) — still popped
  • AllocConsole() + ShowWindow(SW_HIDE) in the bridge — still popped
  • Persistent background worker (pythonw.exe) that keeps one hidden PowerShell alive and pipes commands via TCP/stdin — still pops on the initial PowerShell spawn

Feature Type

Performance / reliability

Scope

Medium (few files, < 300 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING