hermes - 💡(How to fix) Fix [Docker] Shift+Enter / Alt+Enter newline does not work in TUI via docker exec [1 comments, 2 participants]

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…
GitHub stats
NousResearch/hermes-agent#15824Fetched 2026-04-26 05:24:49
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1

Root Cause

The Docker PTY layer normalizes Shift+Enter, Alt+Enter, and Ctrl+J to the same byte sequence as Enter (\n). This means the TUI application receives identical input regardless of which modifier key is used, making it impossible to distinguish "newline" from "submit".

Fix Action

Workaround

None currently available for Docker users who need multi-line input in TUI.

Code Example

docker exec -it hermes-agent /opt/hermes/.venv/bin/hermes --tui
RAW_BUFFERClick to expand / collapse

Problem

When running Hermes TUI via docker exec, the Shift+Enter and Alt+Enter key combinations do not insert a newline — they behave identically to Enter and submit the message immediately.

Example:

docker exec -it hermes-agent /opt/hermes/.venv/bin/hermes --tui

In the TUI:

  • Pressing Shift+Enter → submits the message (same as Enter)
  • Pressing Alt+Enter / Option+Enter (macOS iTerm2) → submits the message (same as Enter)
  • Pressing Ctrl+J → submits the message (same as Enter)

According to the official documentation (ui-tui README), Shift+Enter / Alt+Enter should insert a newline for multi-line input.

Environment

  • Host: macOS (iTerm2 terminal)
  • Container: Docker running Hermes Agent
  • Hermes version: v2026.4.23
  • Access method: docker exec -it hermes-agent /opt/hermes/.venv/bin/hermes --tui

Root Cause

The Docker PTY layer normalizes Shift+Enter, Alt+Enter, and Ctrl+J to the same byte sequence as Enter (\n). This means the TUI application receives identical input regardless of which modifier key is used, making it impossible to distinguish "newline" from "submit".

Expected Behavior

  • Enter → submit message
  • Shift+Enter / Alt+Enter → insert newline (multi-line input)
  • Ctrl+J → insert newline (alternative)

Request

  1. Investigate whether a workaround is possible for Docker environments (e.g., alternative key binding for newline)
  2. If not feasible, consider adding documentation note about this limitation for Docker users
  3. Open to alternative multi-line input methods if the above cannot be resolved

Workaround

None currently available for Docker users who need multi-line input in TUI.

extent analysis

TL;DR

Investigate alternative key bindings or input methods to achieve multi-line input in Hermes TUI within a Docker environment.

Guidance

  • Review the Hermes TUI documentation and configuration options to see if there are any existing alternative key bindings for inserting a newline.
  • Consider using a different terminal emulator or configuration that may handle key combinations differently when used with docker exec.
  • Look into potential workarounds for the Docker PTY layer's normalization of key sequences, such as using a separate input mode or escape sequences.
  • Evaluate the feasibility of adding custom key bindings or input handling to the Hermes TUI application itself.

Example

No specific code example is provided due to the lack of information on the internal workings of the Hermes TUI application and its configuration options.

Notes

The solution may depend on the specific version of Docker, the terminal emulator used, and the capabilities of the Hermes TUI application. Further investigation into these factors is necessary to determine the best course of action.

Recommendation

Apply a workaround, such as investigating alternative key bindings or input methods, as it seems unlikely that the Docker PTY layer's behavior can be changed directly.

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 [Docker] Shift+Enter / Alt+Enter newline does not work in TUI via docker exec [1 comments, 2 participants]