Copied text includes word-wrap line breaks

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Mar 8, 2026 · closed Mar 8, 2026

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.

View original on GitHub ↗

4 Comments

isaacschepp · 7 months ago

Note: would be happy to submit a PR for this if the TUI rendering source code were available. The likely fix is using the terminal's soft-wrap instead of inserting hard newlines when rendering paragraph text.

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/6827
  2. https://github.com/anthropics/claude-code/issues/15199
  3. https://github.com/anthropics/claude-code/issues/13378

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

isaacschepp · 7 months ago

Closing as duplicate of #15199 which comprehensively covers this issue and references other related reports (#6827, #13378). Adding a +1 there.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.