Copied text includes word-wrap line breaks
Problem
When Claude Code outputs a paragraph of text (e.g. notes, citations, descriptions), the terminal UI renders it with hard line breaks at the wrap boundary. When the user selects and copies this text, the clipboard contains unwanted newlines at every wrap point, making the copied text unusable without manual cleanup.
Example: Claude outputs a single-line note like:
Lane household on 1860 census. Mary listed as age 28, born Florida. D Lane is head, farmer from Virginia. All children born in Wisconsin.
When copied from the terminal, the clipboard contains:
Lane household on 1860 census. Mary listed as age 28, born Florida. D Lane is
head, farmer from Virginia. All
children born in Wisconsin.
Expected behavior
Copied text should not include line breaks introduced by word wrapping. The text should copy as a single paragraph, matching the original output.
Environment
- Windows 11 (10.0.26200)
- Windows Terminal 1.23.20211.0
- Shell: bash
Notes
This appears to be caused by Claude Code's TUI rendering text with actual newline characters in the terminal buffer rather than relying on the terminal's soft-wrap. Windows Terminal correctly copies what's in the buffer — the issue is upstream in how the text is written to the terminal.
Windows Terminal's own soft-wrap copy bug (microsoft/terminal#5113) was fixed in v1.0, so this is a separate issue.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗