Environment
- Claude CLI version: 2.1.63
- Operating System: Ubuntu (Linux 6.8.0)
- Terminal: tmux inside alacritty/standard terminal emulator
- TERM:
tmux-256color
- Platform: Anthropic API
tmux configuration (ruled out as cause)
set -sg escape-time 10
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g history-limit 50000
set -g focus-events on
alternate-screen is on (default).
Bug Description
During normal Claude Code sessions in tmux, the terminal rendering becomes corrupted. Text from different parts of the session (code output, permission prompts, previous responses) overlaps and overwrites each other on the same lines, making the interface unreadable.
This is not caused by:
- Resizing tmux panes (happens without any resize)
- Incorrect TERM settings
- Missing tmux configuration
The corruption appears to be in Ink's internal render state — the line positions it caches become out of sync with what's actually displayed. Once corrupted, neither Ctrl-L (terminal redraw) nor tmux's redraw (prefix + r) fixes it, since the problem is in Ink's virtual buffer, not the terminal's.
Steps to Reproduce
- Run Claude Code inside a tmux session
- Have a multi-turn conversation with tool calls (Bash commands, file reads, etc.)
- Eventually the renderer gets into a corrupted state where new output overwrites previous text
The trigger seems to be Ink's full-buffer redraw cycle — particularly when permission prompts appear mid-render, but it also happens during normal streaming output.
Expected Behavior
Text should render sequentially without overlapping. New output should appear below previous output.
Actual Behavior
Text from different render cycles (code blocks, permission dialogs, streaming responses) is drawn at overlapping positions, producing garbled/unreadable output. The corruption persists until the session is restarted.
Workaround
Only reliable fix is /clear or restarting the session.
Related Issues
All three issues appear to stem from the same root cause: Ink redraws the entire terminal buffer on each render cycle rather than doing targeted line updates, and the calculated positions drift from actual terminal state over time.
Environment
tmux-256colortmux configuration (ruled out as cause)
alternate-screenison(default).Bug Description
During normal Claude Code sessions in tmux, the terminal rendering becomes corrupted. Text from different parts of the session (code output, permission prompts, previous responses) overlaps and overwrites each other on the same lines, making the interface unreadable.
This is not caused by:
The corruption appears to be in Ink's internal render state — the line positions it caches become out of sync with what's actually displayed. Once corrupted, neither
Ctrl-L(terminal redraw) nor tmux's redraw (prefix + r) fixes it, since the problem is in Ink's virtual buffer, not the terminal's.Steps to Reproduce
The trigger seems to be Ink's full-buffer redraw cycle — particularly when permission prompts appear mid-render, but it also happens during normal streaming output.
Expected Behavior
Text should render sequentially without overlapping. New output should appear below previous output.
Actual Behavior
Text from different render cycles (code blocks, permission dialogs, streaming responses) is drawn at overlapping positions, producing garbled/unreadable output. The corruption persists until the session is restarted.
Workaround
Only reliable fix is
/clearor restarting the session.Related Issues
All three issues appear to stem from the same root cause: Ink redraws the entire terminal buffer on each render cycle rather than doing targeted line updates, and the calculated positions drift from actual terminal state over time.