[Bug] TUI not repainting after external editor ($EDITOR) exit without SIGWINCH

Resolved 💬 2 comments Opened Apr 22, 2026 by zubin Closed Apr 23, 2026

Bug Description

After opening $EDITOR with ctrl-g and closing it, Claude Code's TUI stays blank until it receives an external repaint stimulus. The draft reappears when any of these happen:

  • Resizing the terminal window
  • Changing font size (Cmd+−/Cmd+0 in Ghostty → triggers SIGWINCH)
  • Pressing Enter (submits the draft; repaint is a side-effect)

Expected: the TUI should repaint automatically when the spawned $EDITOR process exits.

Steps to reproduce:

  1. export EDITOR=nvim
  2. Start Claude Code in a plain terminal (no tmux, no wrapper).
  3. Send any message and wait for a response.
  4. Press ctrl-g, edit the draft, :wq.
  5. Observe: the pane stays blank where the TUI should be. Resize the Ghostty window or change font size → TUI reappears.

Also reproduces inside a tmux pane, so it's not tmux- or terminal-multiplexer-specific.

Environment:

  • Claude Code: 2.1.117
  • OS: macOS (Darwin 25.4.0)
  • Terminal: Ghostty 1.3.1
  • Shell: zsh
  • tmux (secondary repro): 3.6a
  • $EDITOR: nvim

Likely cause: missing render-on-child-exit callback in the TUI render loop. SIGWINCH works because it forces a full repaint regardless of internal dirty-flag state.

Environment Info

  • Platform: darwin
  • Terminal: tmux
  • Version: 2.1.117
  • Feedback ID: 60ed5e60-1170-4bd2-9f60-08be3ac07d75

Errors

[]

View original on GitHub ↗

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