hermes-agent/agent
Teknium cb982ad997 fix(windows): hide console-window flash on backend git/gh/wmic/bash subprocess spawns
The Windows desktop GUI runs its backend headless via pythonw.exe. Several
auxiliary subprocess sites that run inside that windowless backend spawned
console-subsystem children (git, gh, wmic, powershell, bash, rg, taskkill)
WITHOUT CREATE_NO_WINDOW, so Windows allocated a fresh conhost per call and
flashed a black window on screen — sometimes continuously (the dashboard
Projects-tree git probe alone fired ~118 spawns in 60s on startup).

The terminal tool, cron, browser, code_execution, and gateway-spawn paths
already carry windows_hide_flags(); these auxiliary probe/scan/launcher legs
were missed. Wire the existing helper into them:

- tui_gateway/git_probe.py: run_git (+ encoding=utf-8/errors=replace, fixes the
  cp950 UnicodeDecodeError on CJK paths from the same site)
- agent/coding_context.py: _git (per-turn git status/log/diff)
- agent/context_references.py: _run_git + _rg_files (@file/@ref resolution)
- hermes_cli/copilot_auth.py: gh auth token probe (auxiliary provider:auto)
- hermes_cli/gateway.py: wmic + PowerShell Get-CimInstance PID scan
- hermes_cli/main.py: wmic stale-dashboard PID scan
- gateway/status.py: taskkill /T /F force-kill

windows_hide_flags() returns 0 on POSIX, so every changed call is a no-op on
Linux/macOS (verified: real git/rg probes still work; Windows-simulated calls
all pass creationflags=CREATE_NO_WINDOW).

Scoped to the windowless-backend paths that cause the reported flashing. The
Electron updater-handoff leg (main.cjs windowsHide:false) and the
interactive-CLI banner probes (cli.py) are intentionally NOT touched here —
the former needs a Windows-tested change of its own, the latter runs in a
visible console anyway.

Tracking: #54220
Refs: #53178 #53631 #53781 #53957 #49602 #52982 #53424 #53053 #53016
2026-06-28 05:28:45 -07:00
..
lsp
…
pet feat(pets): quality-first OpenRouter model chain + stronger atlas gates + global pet-gen notifications 2026-06-24 23:11:21 -05:00
secret_sources
…
transports fix(cache): content-address prompt_cache_key so recurring cron jobs reuse the warm prefix (#52295) 2026-06-24 21:46:30 -07:00
__init__.py
…
account_usage.py
…
agent_init.py fix(agent): config-driven intent-ack continuation for all api_modes (#27881) (#53943) 2026-06-27 20:46:00 -07:00
agent_runtime_helpers.py fix(agent): config-driven intent-ack continuation for all api_modes (#27881) (#53943) 2026-06-27 20:46:00 -07:00
anthropic_adapter.py fix(anthropic): stop SDK auto-retry double-firing and raise Retry-After cap to 600s 2026-06-27 19:23:15 -07:00
async_utils.py
…
auxiliary_client.py fix(auxiliary): use env-only proxy policy for OpenAI SDK clients (#53702) 2026-06-27 21:22:49 -07:00
azure_identity_adapter.py
…
background_review.py
…
bedrock_adapter.py
…
billing_view.py
…
browser_provider.py
…
browser_registry.py
…
chat_completion_helpers.py fix(agent): stop redacting tool-call args in history; fix auth-header quote-eating 2026-06-28 02:44:06 -07:00
codex_responses_adapter.py
…
codex_runtime.py
…
coding_context.py fix(windows): hide console-window flash on backend git/gh/wmic/bash subprocess spawns 2026-06-28 05:28:45 -07:00
context_compressor.py
…
context_engine.py
…
context_references.py fix(windows): hide console-window flash on backend git/gh/wmic/bash subprocess spawns 2026-06-28 05:28:45 -07:00
conversation_compression.py fix(agent): rebaseline in-place compression flushes 2026-06-27 03:04:26 -07:00
conversation_loop.py fix(agent): route content-filter stream stalls to fallback chain (#32421) 2026-06-28 01:15:21 -07:00
copilot_acp_client.py fix(security): centralize credential-safe subprocess env (#29157) 2026-06-27 20:45:31 -07:00
credential_persistence.py
…
credential_pool.py fix(auth): preserve concurrently-added credentials on pool rewrite 2026-06-27 19:01:37 -07:00
credential_sources.py
…
credits_tracker.py
…
curator.py fix(curator): make external-skill write guard actually fire during curation 2026-06-25 22:03:02 -07:00
curator_backup.py
…
display.py fix(browser): force secret-pattern redaction on browser_type display 2026-06-25 22:02:22 -07:00
error_classifier.py fix(agent): add MiniMax 'new_sensitive' to content_policy_blocked patterns 2026-06-28 01:15:21 -07:00
errors.py
…
file_safety.py fix: use os.pathsep, add tests, update tips for multi-root support 2026-06-27 04:01:12 +05:30
gemini_native_adapter.py
…
gemini_schema.py
…
i18n.py
…
image_gen_provider.py
…
image_gen_registry.py
…
image_routing.py fix(gateway): classify mixed attachments per-attachment + transcode uncommon image formats 2026-06-27 19:26:04 -07:00
insights.py
…
iteration_budget.py
…
jiter_preload.py
…
learn_prompt.py fix(learn): name distilled skills as author Hermes, not the host OS user (#52388) 2026-06-25 12:48:08 -07:00
lmstudio_reasoning.py
…
manual_compression_feedback.py
…
markdown_tables.py
…
memory_manager.py
…
memory_provider.py
…
message_content.py
…
message_sanitization.py fix(agent): close tool-call sequence on all interrupt aborts, not just finalize_turn 2026-06-25 12:24:34 -05:00
moa_loop.py fix(moa): preserve Nous provider identity for references 2026-06-28 00:47:15 -07:00
model_metadata.py fix(moa): resolve context window from the aggregator, not the 256K default (#53780) 2026-06-27 12:08:09 -07:00
models_dev.py
…
moonshot_schema.py
…
nous_rate_guard.py
…
onboarding.py
…
oneshot.py
…
plugin_llm.py
…
portal_tags.py
…
process_bootstrap.py fix(auxiliary): use env-only proxy policy for OpenAI SDK clients (#53702) 2026-06-27 21:22:49 -07:00
prompt_builder.py fix(prompt): repair backend probe import (get_environment never existed) 2026-06-28 02:41:31 -07:00
prompt_caching.py
…
rate_limit_tracker.py
…
reasoning_timeouts.py fix(agent): detect thinking-timeout for reasoning models and surface actionable guidance instead of misleading file-write advice 2026-06-25 19:00:48 -07:00
redact.py fix(redact): non-reusable sentinel for prefix secrets in file reads (#35519) 2026-06-28 04:13:20 -07:00
replay_cleanup.py fix(tui): sanitize replay history on WebUI/TUI session resume (#29086) (#53939) 2026-06-27 20:56:49 -07:00
retry_utils.py fix: handle named custom providers and Z.AI overload retries 2026-06-25 00:17:17 -07:00
runtime_cwd.py
…
secret_scope.py
…
shell_hooks.py fix(windows): hide console-window flash on backend git/gh/wmic/bash subprocess spawns 2026-06-28 05:28:45 -07:00
skill_bundles.py
…
skill_commands.py
…
skill_preprocessing.py fix(windows): hide console-window flash on backend git/gh/wmic/bash subprocess spawns 2026-06-28 05:28:45 -07:00
skill_utils.py fix(curator): protect external skills from background curation 2026-06-25 22:03:02 -07:00
ssl_guard.py
…
stream_diag.py
…
subdirectory_hints.py
…
system_prompt.py
…
think_scrubber.py
…
thinking_timeout_guidance.py fix(agent): detect thinking-timeout for reasoning models and surface actionable guidance instead of misleading file-write advice 2026-06-25 19:00:48 -07:00
title_generator.py
…
tool_dispatch_helpers.py
…
tool_executor.py fix: redact browser typed text surfaces 2026-06-25 22:02:22 -07:00
tool_guardrails.py
…
tool_result_classification.py
…
trajectory.py
…
transcription_provider.py
…
transcription_registry.py
…
tts_provider.py
…
tts_registry.py
…
turn_context.py fix(agent): rebaseline in-place compression flushes 2026-06-27 03:04:26 -07:00
turn_finalizer.py fix(agent,gateway): surface partial-stream recovery and bound detached restart 2026-06-27 22:03:14 -07:00
turn_retry_state.py fix(agent): route content-filter stream stalls to fallback chain (#32421) 2026-06-28 01:15:21 -07:00
usage_pricing.py
…
verification_evidence.py feat(agent): recognize focused ad-hoc verification scripts 2026-06-24 23:03:45 -05:00
verification_stop.py feat(verify-on-stop): default OFF, one-time migration, skip doc-only edits (#53552) 2026-06-27 03:23:22 -07:00
video_gen_provider.py
…
video_gen_registry.py
…
web_search_provider.py
…
web_search_registry.py
…