hermes - 💡(How to fix) Fix [Bug]: TUI multiline input has no reliable modified-Enter shortcut on macOS [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…

Error Message

No traceback. This appears to be an input-parsing / terminal-sequence handling issue.

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

Report       https://paste.rs/NxbRe
agent.log    https://paste.rs/ux4KB
gateway.log  https://paste.rs/4Ox3e

---

No traceback. This appears to be an input-parsing / terminal-sequence handling issue.
RAW_BUFFERClick to expand / collapse

Bug Description

In hermes --tui, I cannot insert a second line using modified Enter on macOS. The shortcuts that appear intended for multiline input do not work in my setup:

  • Shift+Enter: no newline
  • Ctrl+Enter: no newline
  • Cmd+Enter: no newline
  • Option+Enter: also does nothing useful here

As a result, TUI currently has no reliable multiline composition shortcut for me.

Steps to Reproduce

  1. Start Hermes TUI with hermes --tui.
  2. Type part of a message.
  3. Try each of these:
    • Shift+Enter
    • Ctrl+Enter
    • Cmd+Enter
  4. Observe that none of them insert a newline.

Expected Behavior

At least one documented or intended modified-Enter shortcut should reliably insert a newline in TUI on macOS.

Actual Behavior

Modified Enter combinations do not insert a newline in TUI on my macOS terminal setup, so pressing Enter effectively remains single-line submit behavior.

Affected Component

CLI (interactive chat), Other

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Report       https://paste.rs/NxbRe
agent.log    https://paste.rs/ux4KB
gateway.log  https://paste.rs/4Ox3e

Operating System

macOS 15.7.5

Python Version

3.14.4

Hermes Version

Hermes Agent v0.13.0 (2026.5.7)

Additional Logs / Traceback (optional)

No traceback. This appears to be an input-parsing / terminal-sequence handling issue.

Root Cause Analysis (optional)

The TUI input code in ui-tui/src/components/textInput.tsx appears to insert a newline only when key.return arrives with a modifier:

  • Shift+Enter
  • Ctrl+Enter
  • on macOS, action-modifier path (Cmd+Enter)

However, on my setup those modified Enter combinations are apparently not arriving as a distinguishable modified-Enter event.

ui-tui/packages/hermes-ink/src/ink/parse-keypress.ts does support CSI-u / modifyOtherKeys modified Enter parsing, but in this terminal/session path Hermes seems to receive only plain Enter / newline semantics, so TUI submits instead of inserting a newline.

Option+Enter is also not explicitly supported as a TUI multiline shortcut.

Relevant files:

  • ui-tui/src/components/textInput.tsx
  • ui-tui/packages/hermes-ink/src/ink/parse-keypress.ts

Proposed Fix (optional)

Possible approaches:

  1. Add a reliable alternate newline shortcut in TUI that survives common macOS terminal paths, e.g. Ctrl+J.
  2. Detect and support escaped newline forms like ESC+CR / ESC+LF when terminals emit those for Option/Alt+Enter.
  3. Document the actually supported multiline shortcuts per runtime and terminal capability.

A robust fix likely needs both:

  • better fallback handling in TUI input
  • clearer docs for classic CLI vs TUI multiline behavior

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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