# NousResearch/hermes-agent · Shift+Enter newline handling in Ghostty and WezTerm terminals

## Open now

- Nothing open on GitHub.

One issue reports newline/multiline input problems in Ghostty on macOS, and two pull requests with identical titles propose CLI changes for Kitty keyboard protocol Shift+Enter handling in Ghostty and WezTerm. The titles suggest a shared theme, but the outcome of these changes is not stated.

## TL;DR

- 3 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #2345. Verify it addresses your case.
- **Recommended:** read PR #2345 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-2345`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.67`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #1795: \[Bug\]: Newline/multiline input broken in Ghostty terminal on macOS

## Prior & competing PRs

- **#2345: fix(cli): handle Kitty keyboard protocol Shift+Enter for Ghostty/WezTerm**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `cli.py`
  - fix hunks:
  - `cli.py`

    ```diff
    @@ -6044,6 +6044,7 @@ def handle_ctrl_enter(event):
                 """Ctrl+Enter (c-j) inserts a newline. Most terminals send c-j for Ctrl+Enter."""
                 event.current_buffer.insert_text('\n')
     
    +<<<<<<< Updated upstream
             @kb.add('tab', eager=True)
             def handle_tab(event):
                 """Tab: accept completion, auto-suggestion, or start completions.
    ```

    ```diff
    @@ -6080,6 +6081,19 @@ def handle_tab(event):
                 else:
                     # No menu and no suggestion — start completions from scratch
                     buf.start_completion()
    +=======
    +        @kb.add('s-enter')
    +        def handle_shift_enter(event):
    +            """Shift+Enter inserts a newline (standard terminals)."""
    +            event.current_buffer.insert_text('\n')
    +
    +        # Kitty keyboard protocol: Ghostty and other Kitty-protocol terminals
    +        # encode Shift+Enter as CSI 13;2u instead of a simple escape sequence.
    +        @kb.add('escape', '[', '1', '3', ';', '2', 'u')
    +        def handle_kitty_shift_enter(event):
    +            """Shift+Enter in Kitty keyboard protocol (Ghostty, WezTerm, etc.)."""
    +            event.current_buffer.insert_text('\n')
    +>>>>>>> Stashed changes
     
             # --- Clarify tool: arrow-key navigation for multiple-choice questions ---
     
    ```
- **#1798: fix(cli): handle Kitty keyboard protocol Shift+Enter for Ghostty/WezTerm**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#2345`

## Fix status

- Merged to main in PR #2345 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-03-21`. This confirmation is old and may be out of date (a revert/reopen would not have invalidated it here); re-verify.
- Subsystem: `hermes_cli`
