[BUG] Copied text contains extra formatting spaces/chars (v2)
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
- Ask it to print a multi-line hello world with really long chars
- Copy it
- 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
8 Comments
CC dstolts, IsThatLegal, Letiliel, freyjay that participated in the other threads
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.
There's nothing else to add - awaiting a dev to respond. @bcherny
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
Hi
I experience the issue which is described here :
https://github.com/orgs/community/discussions/180736#discussioncomment-15396271
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.
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.
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.