Copying text from CLI in iTerm2 inserts hard line breaks at terminal wrap boundaries

Resolved 💬 3 comments Opened May 7, 2026 by stephviz Closed May 11, 2026

Summary

Selecting and copying Claude Code output from iTerm2 produces clipboard text with hard newlines wherever the terminal soft-wrapped the line for display. Pasting into a chat surface, doc, or editor requires manually re-flowing the text into paragraphs.

Environment

  • Terminal: iTerm2
  • OS: macOS (Darwin 25.4.0)
  • Claude Code version: 2.1.132

Expected

Clipboard preserves the logical paragraph structure of the rendered output — soft wraps introduced for terminal width should not become hard newlines.

Actual

Every visual wrap point becomes a \n in the clipboard.

View original on GitHub ↗

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