[BUG] Copied text contains extra formatting spaces/chars (v2)

Status Closed — not planned
Maintainer reply None cached
Activity 8 comments · opened Nov 4, 2025 · closed Feb 6, 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?

Reviving https://github.com/anthropics/claude-code/issues/5097 + https://github.com/anthropics/claude-code/issues/4686 that were both closed as dupes, but 1 of them should have survived. Inside has all the required info.

Now, we're on v1.0.65

TL;DR: If I copy a multi-line snippet of code, it has extra junk that messes up the code/snippet.

What Should Happen?

Snippets of code should be delicately wrapped for easy and expected copy without bloaty left-hand chars or other unrelated artifacts

Error Messages/Logs

Steps to Reproduce

  1. Ask it to print a multi-line hello world with really long chars
  2. Copy it
  3. Paste somewhere else - it will be different

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

v1.0.65

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Windows+WSL bash both experiences this

---

<img width="174" height="61" alt="Image" src="https://github.com/user-attachments/assets/c386fff2-9fd7-437c-bce7-563594de3d3d" />

Notice the trailing two spaces on the left before the {. Every line is like this

View original on GitHub ↗

8 Comments

dhunt-xsolla · 11 months ago

CC dstolts, IsThatLegal, Letiliel, freyjay that participated in the other threads

github-actions[bot] · 10 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

dhunt-xsolla · 10 months ago

There's nothing else to add - awaiting a dev to respond. @bcherny

mirekphd · 9 months ago

Possibly related (latest - v4.5 - models such as Sonnet and Opus available in Github Copilot are inserting extra redundant spaces after punctuation marks in that particular - interface - web chat app):
https://github.com/orgs/community/discussions/180736

soroushyasini · 9 months ago
github-actions[bot] · 8 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 8 months ago

1) There is now an issue about issues closed as duplicates of each other - and it contains your combination! https://github.com/anthropics/claude-code/issues/19267

2) This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] · 8 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.