anthropics / anthropics/claude-code
Terminal rendering left-margin indentation is included when copying assistant text
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
## What happened
When copying a plain-text response from the terminal (e.g. to paste into an external web form), the pasted text has leading whitespace/indentation on each line. This indentation appears to be part of how the terminal UI renders assistant messages (a left margin distinguishing them from other content), not part of the actual text content returned by the model.
Tried multiple workarounds from the model side (removing markdown formatting, collapsing to a single paragraph, collapsing to a single line) — none change the outcome, since the issue is in the rendering/selection layer, not the text content itself.
## Repro steps
1. In an interactive terminal session, ask Claude Code for a plain-text paragraph intended for copy-paste elsewhere.
2. Select and copy the response text directly from the terminal (e.g. via mouse drag-select).
3. Paste into a plain-text field (e.g. a web form, a text editor).
## Expected
Pasted text has no leading whitespace — it matches the actual text content of the response.
## Actual
Pasted text has leading whitespace on each line, requiring manual cleanup before it can be used elsewhere.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the copy and paste behavior in an interactive terminal session, then trace the terminal rendering and text-selection path responsible for assistant messages. Done means copied plain-text responses no longer include the left-margin whitespace on each line, while the visible terminal layout remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100