CLI terminal escape sequence leaks and corruption

NousResearch/hermes-agent · cluster 13870 · hermes cli

Data as of

Nothing open on GitHub. Fix merged in #53576. Check it covers your case.

The short answer

0open issues
0open PRs
8items grouped
Known?
Yes. 8 related items grouped here, 3 issues already closed.
Fix event
A fix was merged to main in PR #53576. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this partially resolved, deciding PRs #53576, #54058. That is separate from the fix event.
Still open
Nothing open on GitHub.

Multiple bug reports and fixes addressing escape sequence leakage (particularly CPR/DSR cursor position queries), garbled terminal input, and terminal state corruption after interrupting agent runs. Issues span SSH/tunnel environments, local TTYs, and various platform conditions.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #53576 fix(cli): disable prompt_toolkit CPR queries to stop escape-sequence leak (#13870)

    merged to main

    files: cli.py, tests/cli/test_cli_init.py

  • #54058 fix(cli): recover terminal state after interrupting a running turn (#33271)

    merged to main

    files: cli.py, tests/cli/test_terminal_interrupt_recovery.py

  • #68418 fix(cli): suppress CPR on POSIX local TTYs under load

    merged to main

    files: cli.py, tests/cli/test_cli_init.py, tests/cli/test_cpr_local_leak.py

2 PRs closed without merging

From the close comments: merged via another change 1 · superseded by another PR 1

  • #13910 fix(cli): disable CPR queries to prevent escape sequence leak over SSH/tunnels · superseded by another PR → b34771f, #53576
  • #34064 fix(cli): recover terminal state after interrupt to prevent raw control sequence freeze · merged via another change → f3aaba7, #54058
Closed issues · 3
  • Closed#13870[Bug]: CPR Leak on UI CLI
  • Closed#14692[Bug]: CLI input field leaks terminal control sequences (cursor positioning / DSR responses) causing garbled input
  • Closed#33271[Bug]: Terminal becomes unresponsive with raw control sequences (e.g., ^[[19;1R) after interrupting a running agent with a new message Version: Hermes CLI (latest) Platform: macOS / Linux (observed on both)
How this cluster was grouped
  • Link evidence (partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
  • Members outside that structural core may belong to a different underlying problem.
  • Pairwise link density 0.22: the share of item 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.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
hermes cli
Merged PRs
#53576, #54058, #68418
Closed issues
3
Attempts
2 PRs closed without merging
Fix link checked
21 Jul 2026

For your agent

The same facts, typed.