Bug Description
When Hermes TUI (hermes --tui) triggers a dangerous-command security scan and shows the approval overlay, pressing Ctrl+C is treated as "deny" — immediately rejecting the command — instead of allowing copy. This makes it impossible to select and copy the displayed command text for review before making a security decision.
The TUI (xterm.js-based interface) already has special handling for text-selection-aware copy in general use (#16181 mentions this), but the approval overlay intercepts Ctrl+C as its own "deny" binding, overriding any copy behavior even when text is selected.
Steps to Reproduce
- Start Hermes in TUI mode:
hermes --tui
- Trigger a dangerous-command security scan (any terminal command matching DANGEROUS_PATTERNS)
- The approval overlay appears showing the command and approve/deny buttons
- Select text with the mouse (the command text, or any part of the overlay)
- Press Ctrl+C to copy the selection
- Observe: text is not copied; instead the command is denied immediately
Expected Behavior
When text is selected in the approval overlay, Ctrl+C should copy the selection. Deny should be triggered only when no text is selected, or via a separate keybinding. This is consistent with how the TUI already handles the text-selection vs interrupt distinction (#16181).
Actual Behavior
Ctrl+C is always intercepted by the approval overlay and treated as "deny", regardless of whether text is selected. The command is rejected immediately instead of being copied. Copy via right-click context menu also does not work because the approval overlay is a modal state with limited interaction.
Affected Component
Other (TUI — hermes --tui)
Messaging Platform (if gateway-related)
N/A (TUI)
Debug Report
Unable to run hermes debug share in this environment. Known details:
- Hermes: v0.12.0 (2026.4.30)
- Python: 3.11.15
- OS: Ubuntu 24.04 (WSL2 on Windows 11)
- Terminal: Windows Terminal
Operating System
Ubuntu 24.04 (WSL2 on Windows 11)
Python Version
3.11.15
Hermes Version
v0.12.0 (2026.4.30)
Are you willing to submit a PR for this?
Bug Description
When Hermes TUI (
hermes --tui) triggers a dangerous-command security scan and shows the approval overlay, pressing Ctrl+C is treated as "deny" — immediately rejecting the command — instead of allowing copy. This makes it impossible to select and copy the displayed command text for review before making a security decision.The TUI (xterm.js-based interface) already has special handling for text-selection-aware copy in general use (#16181 mentions this), but the approval overlay intercepts Ctrl+C as its own "deny" binding, overriding any copy behavior even when text is selected.
Steps to Reproduce
hermes --tuiExpected Behavior
When text is selected in the approval overlay, Ctrl+C should copy the selection. Deny should be triggered only when no text is selected, or via a separate keybinding. This is consistent with how the TUI already handles the text-selection vs interrupt distinction (#16181).
Actual Behavior
Ctrl+C is always intercepted by the approval overlay and treated as "deny", regardless of whether text is selected. The command is rejected immediately instead of being copied. Copy via right-click context menu also does not work because the approval overlay is a modal state with limited interaction.
Affected Component
Other (TUI —
hermes --tui)Messaging Platform (if gateway-related)
N/A (TUI)
Debug Report
Unable to run
hermes debug sharein this environment. Known details:Operating System
Ubuntu 24.04 (WSL2 on Windows 11)
Python Version
3.11.15
Hermes Version
v0.12.0 (2026.4.30)
Are you willing to submit a PR for this?