/exit and Ctrl+D bounce to the agents screen instead of quitting (infinite loop)

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 4, 2026

Bug

With background tasks or stopped subagents in the session history, quitting is impossible:

  • /exit → drops into the agents screen (task viewer) instead of quitting
  • Ctrl+D → also goes to the agents screen
  • Esc from the agents screen → back to the prompt

These three cycle forever. The only way out is closing the terminal window.

Repro

  1. Run a session that spawns background subagents (e.g. a skill that fans out review agents).
  2. Let them complete, or stop some.
  3. /exit, or Ctrl+D.

Expected: the session exits. Actual: agents screen, and no keybinding leaves it.

Environment

  • macOS (Darwin 25.6.0)
  • Session had several completed and manually-stopped background subagents at the time.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗