Files
hermes-agent/hermes_cli
JoaoMarcos44 c02af6d14a fix(pm): gateway and dashboard never prompt for a lazy install on an inherited TTY
pm.extras.ensure_import asked "Install it now? [Y/n]" whenever
stdin/stdout were TTYs. A gateway run under a tmux respawn loop, or
started as a hidden Windows console, has a TTY. So a missing extra
(check_telegram_requirements -> ensure_import("telegram")) blocked the
event loop in input() until the liveness watchdog exited 75, and the
respawn loop repeated that indefinitely.

suppress_interactive_install_prompts() is a process-wide, re-entrant
scope; ensure_import treats it like a running prompt_toolkit app. It
now wraps gateway.run_bootstrap.start_gateway (hermes gateway run,
gateway.run.main) and hermes_cli.web_server.start_server
(dashboard/serve).

Live: on main, check_telegram_requirements under a real PTY sat at
the [Y/n] prompt. On this head, inside the gateway scope, it returns
False with no prompt (the adapter is skipped with "requirements not
met").

Salvages #125775 (@JoaoMarcos44): the scope and its pm test are
cherry-picked; the call sites are re-applied because start_gateway
moved to run_bootstrap and dashboard startup moved to start_server.
Part of #125607 (the no-prompt half; the off-loop install half follows in the next layer)
2026-11-09 15:02:48 -08:00
..
…
…
…
…
…
…
…
…
…
…