[BUG] Cursor position and rendering corruption in long sessions on macOS (iTerm2)

Open 💬 10 comments Opened Jun 10, 2026 by stephenc222

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

After a session runs long enough, the TUI rendering becomes corrupted in several ways:

  1. Cursor jumps — the input cursor teleports between the top border and the bottom border of the input area erratically
  2. Garbled transcript — previously rendered text in the conversation area becomes visually jumbled
  3. Input area displacement — the user input box is no longer anchored to the bottom of the terminal; it appears at inconsistent vertical positions

What Should Happen?

Input area stays anchored at the bottom, cursor stays within the input box, transcript renders cleanly.

Steps to Reproduce

  1. Start a long Claude Code session with many tool calls and large output
  2. Continue interacting until the session history is substantial
  3. Observe the input area and surrounding chrome

Error Messages/Logs

No explicit error output — this is a visual/rendering corruption.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Claude Code Version

2.1.170 (first observed in 2.1.169)

Platform

Anthropic API

Operating System

macOS Sequoia (M4 Max)

Terminal/Shell

iTerm2

Additional Information

Likely a terminal resize/redraw issue related to accumulated scroll state or row-count miscalculation after the terminal history grows past a certain threshold. Possibly related to how the TUI recalculates layout on each render pass in long sessions.

Screenshots to follow in a comment (3 captures from separate sessions showing the corruption).

View original on GitHub ↗

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