[Bug] Excessive blank lines causing continuous terminal scrolling

Resolved 💬 12 comments Opened Oct 28, 2025 by rgucsb Closed Feb 22, 2026

Bug Description
I'll draft a comprehensive bug report for you to send to Anthropic.

---

Subject: Claude Code CLI - Continuous Scrolling/Excessive Blank Lines Bug

Description:
Claude Code CLI exhibits continuous scrolling behavior caused by excessive blank lines being added to the terminal output. This makes the tool unusable as the screen constantly scrolls during both user input (every keystroke) and while Claude is thinking/executing.

Environment:

  • Claude Code Version: 2.0.28
  • Operating System: macOS 26.0.1 (Build 25A362) - also occurred on macOS 15.x (Sequoia)
  • Node.js Version: v22.16.0
  • npm Version: 10.9.2
  • Terminals Tested: iTerm2 (v3.6.5), Terminal.app, VS Code integrated terminal
  • Shell: zsh (default macOS configuration)

Timeline:

  • Claude Code worked correctly until approximately 2 months ago (around August 2024)
  • Issue has persisted across multiple Claude Code versions
  • Issue persisted through macOS upgrade from 15.x to 26.0.1

Reproduction Steps:

  1. Run claude auth login or any Claude Code command
  2. Type any input or wait for Claude to respond
  3. Observe continuous scrolling as blank lines are added to the terminal

Expected Behavior:
Claude Code should render its UI without adding excessive blank lines, maintaining a stable viewport.

Actual Behavior:

  • Every keystroke triggers scrolling
  • During Claude's thinking/execution, continuous scrolling occurs
  • Multiple blank separator lines with just > character are added after responses
  • Makes the tool completely unusable

Evidence:
Script recording of terminal session shows Claude Code adding numerous blank lines with separator characters:

────────────────────────────────────────────────────────────────────────────────
                                                                               >
────────────────────────────────────────────────────────────────────────────────
                                                                               >
────────────────────────────────────────────────────────────────────────────────

Troubleshooting Already Attempted:

  • Complete uninstall/reinstall of Claude Code (removed npm package + all config files)
  • Tested across multiple terminals (iTerm2, Terminal.app, VS Code)
  • Tested with different TERM values (xterm-256color, xterm, dumb)
  • Tested with different terminal dimensions (80x24, 114x80, 244x80)
  • Tested with/without external monitor
  • Verified no shell customizations or conflicts
  • Checked for interfering software (none found)
  • Modified iTerm2 scrollback and mouse reporting settings
  • None of these resolved the issue

Analysis:
The issue appears to be a bug in Claude Code's terminal UI rendering library where it incorrectly calculates vertical space requirements and adds excessive blank lines to maintain a viewport, particularly when using status bars or after rendering responses.

Impact:
Claude Code CLI is completely unusable. User had to cancel subscription and is unable to use the tool despite multiple reinstallation attempts.

Request:
Please investigate this rendering issue in Claude Code's terminal UI. This appears to affect the terminal library's handling of viewport height and blank line insertion.

---

Where to send this:

You can submit this bug report:

  1. Anthropic Support: https://support.claude.com
  2. Claude Code GitHub Issues (if there's a public repo)
  3. Via the feedback option in Claude Code (if available)

Would you like me to adjust anything in this bug report before you send it?

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.0.28
  • Feedback ID: fa51164b-1c50-44c0-b018-ddd98b8b0f3c

Errors

Note: Error logs were truncated.

View original on GitHub ↗

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