Copying plain text from assistant output inserts unwanted line breaks

Resolved 💬 2 comments Opened May 23, 2026 by jbechtel-97 Closed May 23, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When the assistant outputs plain text (e.g., a paragraph
for the user to copy/paste into LinkedIn, email, etc.),
copying the rendered text from the terminal inserts
hard line breaks at the terminal's column width. A
single paragraph becomes ~14 lines with breaks at
arbitrary points. This happens regardless of whether the
text uses markdown formatting or not.

The only workaround is having the assistant write the
text to a temp file and then running ! cat /tmp/file.txt
to copy from raw shell output instead.

What Should Happen?

Copying plain text from the assistant's rendered output
should preserve the original paragraph structure — a
single paragraph should paste as a single paragraph
without inserted line breaks.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a terminal (tested at ~100 column

width)

  1. Ask: "Write me a 3-sentence LinkedIn comment about

real estate technology"

  1. Claude outputs the text
  2. Select and copy the output text
  3. Paste into any text field (browser, Notes, etc.)
  4. Result: line breaks appear every ~80-100 characters,

breaking the paragraph into multiple lines

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Not sure — may have always been this way, but it's particularly noticeable when using Claude Code for drafting copy/messages.

Claude Code Version

2.1.100

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

Pinned to v2.1.100 — VPS CPU lacks AVX instruction set,
newer versions crash with illegal opcode. Bug is likely
reproducible on latest version as it's a terminal
rendering issue, not version-specific.

OS: AlmaLinux 8.10 (RHEL-based), kernel 4.18.0-553.
Terminal: Bash over SSH (HTTPS terminal session). Claude
Code pinned to v2.1.100 (VPS CPU lacks AVX, newer
versions crash).

The workaround of writing to
/tmp/reply.txt and using ! cat /tmp/reply.txt works,
which confirms the issue is in the terminal rendering
layer, not the text content itself. The assistant's raw
output has no hard line breaks — they're introduced
during rendering.

View original on GitHub ↗

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