Teknium
74181fe726
fix: add TTY guard to interactive CLI commands to prevent CPU spin (#3933)
When interactive TUI commands are invoked non-interactively (e.g. via
the agent's terminal() tool through a subprocess pipe), curses loops
spin at 100% CPU and input() calls hang indefinitely.
Defense in depth — two layers:
1. Source-level guard in curses_checklist() (curses_ui.py + checklist.py):
Returns cancel_returns immediately when stdin is not a TTY. This
catches ALL callers automatically, including future code.
2. Command-level guards with clear error messages:
- hermes tools (interactive checklist, not list/disable/enable)
- hermes setup (interactive wizard)
- hermes model (provider/model picker)
- hermes whatsapp (pairing setup)
- hermes skills config (skill toggle)
- hermes mcp configure (tool selection)
- hermes uninstall (confirmation prompt)
Non-interactive subcommands (hermes tools list, hermes tools enable,
hermes mcp add/remove/list/test, hermes skills search/install/browse)
remain unaffected.
2026-03-30 08:10:23 -07:00
..
2026-03-28 13:11:39 -07:00
2026-03-29 21:38:10 -07:00
2026-03-29 16:53:29 -07:00
2026-03-30 00:02:02 -07:00
2026-03-30 08:10:23 -07:00
2026-03-29 22:49:34 -07:00
2026-03-11 02:56:19 -07:00
2026-03-29 20:10:00 -07:00
2026-03-17 10:04:53 -07:00
2026-03-26 14:41:04 -07:00
2026-03-30 02:59:39 -07:00
2026-03-25 15:02:03 -07:00
2026-03-14 21:17:41 -07:00
2026-03-30 08:10:23 -07:00
2026-03-26 01:34:27 -07:00
2026-03-29 10:41:20 -07:00
2026-03-25 15:02:03 -07:00
2026-03-29 21:29:13 -07:00
2026-03-30 08:10:23 -07:00
2026-03-30 08:10:23 -07:00
2026-03-25 15:02:03 -07:00
2026-03-29 15:44:07 -07:00
2026-03-25 19:47:58 -07:00
2026-03-29 10:39:57 -07:00
2026-03-30 02:48:06 -07:00
2026-03-29 10:41:20 -07:00
2026-03-28 14:55:27 -07:00
2026-03-29 21:53:28 -07:00
2026-03-29 21:29:13 -07:00
2026-03-28 23:47:21 -07:00
2026-03-25 15:54:28 -07:00
2026-03-29 21:29:13 -07:00
2026-03-29 21:29:13 -07:00
2026-03-25 19:47:58 -07:00
2026-03-28 23:47:21 -07:00