# NousResearch/hermes-agent · TUI exit corrupts terminal state for shells/apps

## Open now

- 1 issue, 2 PRs open on GitHub.
- #56759: \[Bug\]: TUI leaves terminal in corrupted state after clean /quit — breaks legacy ncurses apps (e.g. nano); survives stty sane and manual escape-sequence resets, requires full reset
- PR #56765: fix: kitty keyboard protocol corruption after TUI /quit
- PR #57161: fix(tui): reset terminal modes before Ink unmount to prevent kitty keyboard leak (#56759)

Multiple bug reports and fix attempts addressing the TUI leaving the terminal in a broken state after quitting, including leaked mouse/focus modes and kitty keyboard protocol sequences that corrupt subsequent shell or ncurses application behavior.

## TL;DR

- 3 member(s): 1 open issue(s), 0 closed issue(s), 2 open PR(s), 0 merged PR(s), 0 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. 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.

## Open related issues

- #56759: \[Bug\]: TUI leaves terminal in corrupted state after clean /quit — breaks legacy ncurses apps (e.g. nano); survives stty sane and manual escape-sequence resets, requires full reset

## Prior & competing PRs

- **#56765: fix: kitty keyboard protocol corruption after TUI /quit**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#56759`, `#57161`
  - files: `ui-tui/packages/hermes-ink/src/ink/ink.tsx`, `ui-tui/packages/hermes-ink/src/ink/termio/csi.ts`
- **#57161: fix(tui): reset terminal modes before Ink unmount to prevent kitty keyboard leak (#56759)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `ui-tui/src/app/useMainApp.ts`

## Fix status

- No merged fix on record.
- Subsystem: `hermes_cli`
