hermes - 💡(How to fix) Fix CLI: Enter during approval panel silently drops buffer text instead of forwarding as follow-up [1 pull requests]

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…

When the dangerous-command approval panel is showing in the CLI and the user has typed text in the input buffer, pressing Enter resolves the approval (confirming the highlighted choice) but silently ignores any text in the buffer. The user's follow-up message is neither sent to the agent nor cleared from the buffer.

Root Cause

In cli.py, the handle_enter keybinding handler has an early-return for the approval state:

if self._approval_state:
    self._handle_approval_selection()
    event.app.invalidate()
    return

After _handle_approval_selection() resolves the approval, the function returns immediately without checking event.app.current_buffer.text or self._attached_images. Any content the user typed is neither forwarded to the agent nor cleared.

Fix Action

Fixed

Code Example

if self._approval_state:
    self._handle_approval_selection()
    event.app.invalidate()
    return

---

if self._approval_state:
    text = event.app.current_buffer.text.strip()
    has_images = bool(self._attached_images)
    self._handle_approval_selection()
    if text or has_images:
        images = list(self._attached_images) if has_images else []
        self._attached_images.clear()
        payload = (text, images) if images else text
        if self._agent_running:
            self._interrupt_queue.put(payload)
        else:
            self._pending_input.put(payload)
        event.app.current_buffer.reset()
    event.app.invalidate()
    return
RAW_BUFFERClick to expand / collapse

Description

When the dangerous-command approval panel is showing in the CLI and the user has typed text in the input buffer, pressing Enter resolves the approval (confirming the highlighted choice) but silently ignores any text in the buffer. The user's follow-up message is neither sent to the agent nor cleared from the buffer.

Root Cause

In cli.py, the handle_enter keybinding handler has an early-return for the approval state:

if self._approval_state:
    self._handle_approval_selection()
    event.app.invalidate()
    return

After _handle_approval_selection() resolves the approval, the function returns immediately without checking event.app.current_buffer.text or self._attached_images. Any content the user typed is neither forwarded to the agent nor cleared.

Proposed Fix

Check the buffer after resolving the approval and forward any content to _interrupt_queue (agent running) or _pending_input (idle):

if self._approval_state:
    text = event.app.current_buffer.text.strip()
    has_images = bool(self._attached_images)
    self._handle_approval_selection()
    if text or has_images:
        images = list(self._attached_images) if has_images else []
        self._attached_images.clear()
        payload = (text, images) if images else text
        if self._agent_running:
            self._interrupt_queue.put(payload)
        else:
            self._pending_input.put(payload)
        event.app.current_buffer.reset()
    event.app.invalidate()
    return

Reproduction

  1. Start hermes (CLI, default mode)
  2. Trigger a dangerous command approval
  3. Type a follow-up message in the buffer
  4. Press Enter - approval resolves, follow-up is silently stuck
  5. User thinks their message was sent but it wasn't

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

hermes - 💡(How to fix) Fix CLI: Enter during approval panel silently drops buffer text instead of forwarding as follow-up [1 pull requests]