[Bug] Ctrl+G external editor suspends TUI - cannot scroll conversation while GUI editor is open

Resolved 💬 3 comments Opened Mar 20, 2026 by satokupo Closed Mar 23, 2026

Bug Description

When using Ctrl+G (chat:externalEditor) to open a GUI-based editor (CotEditor with cot --wait), Claude Code's TUI is suspended and the terminal goes completely dark. The user cannot scroll through previous conversation output while composing in the external editor.

For GUI editors that open in a separate window, the expected behavior would be for the TUI to remain visible so users can reference previous AI output while writing their prompt.

Environment Info

  • Platform: macOS (Darwin 25.3.0)
  • Claude Code Version: 2.1.80
  • Terminal: Ghostty + tmux
  • Editor: export EDITOR="cot --wait" (CotEditor)

Steps to Reproduce

  1. Set EDITOR="cot --wait" (or any GUI editor with --wait flag)
  2. Start Claude Code in a terminal (Ghostty, iTerm, etc.)
  3. Have a conversation with some output
  4. Press Ctrl+G
  5. Terminal goes dark/blank. CotEditor opens in a separate window
  6. Cannot scroll terminal to read previous conversation output

Expected Behavior

  • Ctrl+G opens CotEditor in a separate window
  • Terminal remains visible with Claude Code's output intact
  • User can scroll through conversation history while composing in the editor
  • When the editor window is closed (Cmd+W), input is submitted to Claude Code

Actual Behavior

  • Terminal goes completely dark when Ctrl+G is pressed
  • TUI is suspended until the external editor process exits
  • Cannot reference any previous conversation output

Notes

  • This worked fine with code --wait (VS Code) inside VS Code's integrated terminal, but that's a special case where VS Code handles the editor tab internally
  • Related closed issues: #11439, #11409, #3635, #10293
  • A possible fix: detect if the $EDITOR command opens a GUI window (non-TTY) and keep the TUI active while waiting for the process to exit

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗