# NousResearch/hermes-agent · Ctrl+D CLI behavior: delete char vs EOF exit

## Open now

- 1 issue, 0 PRs open on GitHub.
- #8478: fix: Ctrl+D deletes character under cursor instead of sending EOF

These issues and pull requests address how the CLI handles Ctrl+D, specifically whether it should delete the character under the cursor or exit the session, with proposals to match standard readline/bash/zsh semantics (exit only on empty input).

## TL;DR

- 8 member(s): 1 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 5 PR(s) closed without merging.
- A fix was merged to main in PR #15383. Verify it addresses your case.
- **Recommended:** read PR #15383 (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: `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.26`: 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

- #8478: fix: Ctrl+D deletes character under cursor instead of sending EOF

## Closed / duplicate issues

- #6448: Ctrl+D unconditionally exits CLI session even with text in input buffer

## Prior & competing PRs

- **#15383: fix(cli): Ctrl+D = readline semantics (delete-char + EOF-only-when-empty)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `cli.py`, `scripts/release.py`
  - fix hunks:
  - `cli.py`

    ```diff
    @@ -9525,9 +9525,20 @@ def handle_ctrl_c(event):
             
             @kb.add('c-d')
             def handle_ctrl_d(event):
    -            """Handle Ctrl+D - exit."""
    -            self._should_exit = True
    -            event.app.exit()
    +            """Ctrl+D: delete char under cursor (standard readline behaviour).
    +            Only exit when the input is empty — same as bash/zsh. Pending
    +            attached images count as input and block the EOF-exit so the
    +            user doesn't lose them silently.
    +            """
    +            buf = event.app.current_buffer
    +            if buf.text:
    +                buf.delete()
    +            elif self._attached_images:
    +                # Empty text but pending attachments — no-op, don't exit.
    +                return
    +            else:
    +                self._should_exit = True
    +                event.app.exit()
     
             _modal_prompt_active = Condition(
                 lambda: bool(self._secret_state or self._sudo_state)
    ```
  - `scripts/release.py`

    ```diff
    @@ -68,6 +68,7 @@
         "185121704+stablegenius49@users.noreply.github.com": "stablegenius49",
         "101283333+batuhankocyigit@users.noreply.github.com": "batuhankocyigit",
         "255305877+ismell0992-afk@users.noreply.github.com": "ismell0992-afk",
    +    "[redacted:email]": "iRonin",
         "[redacted:email]": "jvcl",
         "[redacted:email]": "aj-nt",
         "[redacted:email]": "francip",
    ```
- **#4783: fix: Ctrl+D deletes char under cursor, exits only on empty input**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#15383`
- **#6471: fix(cli): only exit on Ctrl+D when input buffer is empty**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`
- **#6476: \[codex\] Fix Ctrl+D EOF behavior in the CLI**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#15383`
- **#8489: fix: Ctrl+D deletes char under cursor, only exits on empty input (bash/zsh behaviour)**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#4783`
- **#9252: fix(cli): make Ctrl-D respect Unix EOF semantics**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#15383`, `#4783`

## Fix status

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