Terminal rendering causes severe flickering in tmux and multiplexed terminals
Problem
Claude Code's terminal rendering does full viewport redraws on every state change (every streamed token, every tool call update, every UI transition). This causes:
- Severe flickering in tmux, screen, and terminal multiplexers
- Visual corruption when running inside WezTerm's unix domain multiplexer
- Unusable experience for anyone who uses tmux (which is... a lot of terminal users)
The root cause appears to be Ink (React for CLI), which re-renders the entire component tree on state updates rather than diffing terminal cells and emitting minimal escape sequences.
Expected Behavior
A streaming chat interface should:
- Append new text to the viewport without redrawing existing content
- Diff the terminal buffer and only emit escape sequences for changed cells
- Not clear-and-redraw the entire screen on every streamed token
This is how every other modern TUI works (vim, htop, lazygit, etc.) and is table stakes for terminal multiplexer compatibility.
Environment
- macOS (Sequoia)
- Ghostty, WezTerm, Alacritty
- tmux / WezTerm unix domain multiplexing
- Claude Code latest
Possible Solutions
Frameworks that handle incremental terminal rendering correctly:
- bubbletea (Go) — Elm architecture, proper diffing, huge ecosystem (glamour for markdown, lipgloss for styling, bubbles for inputs). Used by lazygit, soft-serve, gum, etc.
- ratatui (Rust) — double-buffered diffing, only emits changes. Used by gitui, bottom, etc.
Both of these are battle-tested in tmux and every multiplexer under the sun.
Impact
This affects every developer who uses a terminal multiplexer, which is a significant portion of Claude Code's target audience. Many of us live in tmux — it's not an edge case.
The irony of shipping a tool built by the most capable AI, that could probably fix its own rendering layer, is not lost on anyone. 🙂
Love the product otherwise — just please make it stop flickering. 🙏
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗