[BUG] TUI doesn't redraw after terminal resize from KVM switch, requires user input to recover.

Resolved 💬 2 comments Opened Apr 3, 2026 by ioquark Closed May 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

TUI goes blank after KVM switch on macOS, recovers only on user input

Description

When switching between computers via a KVM switch (Level1Techs DP 1.4), the Claude Code TUI goes completely blank. The Ghostty terminal window itself is fine — other terminal content, other windows, and the shell all redraw correctly. Only the Claude Code rendering surface is blank.

The session recovers immediately when I send a message (any input). The session is still running — it's purely a rendering issue.

Environment

  • OS: macOS 15 (Sequoia), Apple Silicon (M3 Ultra)
  • Terminal: Ghostty 1.x
  • Claude Code version: latest
  • KVM: Level1Techs 4-port DisplayPort 1.4
  • Multiple machines sharing one monitor via KVM

Likely cause

The KVM switch triggers a DisplayPort disconnect/reconnect, which causes a terminal resize (SIGWINCH). Ghostty handles this and redraws its own content, but the Ink rendering layer inside Claude Code does not re-render until new application state arrives (user input). The render cycle appears to be gated on state changes rather than also responding to terminal resize events.

Related issues

  • #9693 — SIGWINCH not handled (closed, not planned)
  • #6481 — Resize rendering corruption (open, stale)
  • #11234 — KVM switch redraw issues on Windows (closed, completed)
  • #22317 — Blank screen after switching away on macOS (closed, duplicate)

This is distinct from those: the screen is fully blank (not corrupted), macOS + Ghostty (not Windows/Kitty), and it recovers cleanly on any user input rather than requiring a restart.

What Should Happen?

Expected behavior

Claude Code TUI should redraw after the display reconnects, the same way the rest of the terminal content does.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

  1. Start a Claude Code session in Ghostty
  2. Switch to a different computer using the KVM hardware button
  3. Switch back to the original computer
  4. Claude Code TUI is blank — Ghostty window frame and other tabs/windows render correctly
  5. Type any message and press Enter — the TUI fully recovers and shows conversation history

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.91 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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