[BUG] Multi-line text on is truncated when pasted into prompt field (on Windows)
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.67
- Operating System: Windows 10
- Terminal: Windows Terminal with Powershell
Bug Description
When copy & paste long, multi-line text into the prompt input field
Steps to Reproduce
- Launch Claude Code in an empty folder
Copy the following text:
# "Chromatic Cascade" - Game Design Summary
## Core Concept
A color-based puzzle game where players manipulate light sources to create specific color patterns. Inspired by optics and prism effects, players solve increasingly complex puzzles by directing light through various obstacles and color-altering elements.
## Key Terminology
- **Illuminator**: The player's role
- **Spectrum**: Individual game levels with unique objectives
- **Prisms**: Tools used to split and redirect light
- **Filters**: Elements that change light properties
- **Blueprint**: Pre-level information about the challenge
- **Completion Reward**: What the player unlocks upon success
- **Luminous Pattern**: The specific light configuration players aim to create
- **Parameters**: Rules and specific objectives for each Spectrum
## Gameplay Mechanics
1. Players review the Blueprint before each level
2. Each Spectrum has a unique light pattern objective
3. Players manipulate light sources, prisms, mirrors, and filters
4. Success requires matching the specific pattern defined in the Parameters
5. Players work for "The Curator" (mysterious collector of light phenomena)
## Spectrum Structure
- Diverse puzzle environments (abandoned lighthouse, ancient observatory, etc.)
- Progressive difficulty introducing new optical concepts
- Unique puzzles (refraction, diffraction, interference patterns)
- Physics-based solutions with multiple possible approaches
## Demo Version
- 3-4 initial Spectrums
- First Spectrum: Simple light redirection in an old lighthouse tower
The game creates puzzles around light manipulation and color theory, challenging players' spatial reasoning while teaching fundamental concepts of optics through engaging gameplay.
Expected Behavior
The text chunk is corrected pasted into the prompt field.
Actual Behavior
The prompt field says:
[Pasted text #1 +19 lines]
But the text has 33 lines! The last 14 lines are truncated for some reason.
Additional Context
If I only paste 5~10 lines at once it works properly. But it's quite ridiculous that we can't paste a mere 33-line document into the prompt field...
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.
Still an issue.
Still an issue.
This issue is a massive productive killer. The inability to paste content properly to the AI is just all manner of awfulness. The worst part is you can't even tell if it was truncated or not because on such pastes it doesn't show you what was actually pasted, rather it just puts that [Pasted test #1 +49 lines] type deal in the input. So you have to hit enter and submit it just to then find out it was truncated. Ugh!
Still an issue as of 2.0.71
This issue still persist in 2.0.73. And seems to be getting worse... seems like the amount I can paste before it truncates is like less than a dozen lines.
Please... understand how big of a deal this is. You cannot effectively work with this if you can't cut and paste context into the agent. It's really devastating to getting stuff done. I know you are on a tear to implement dozens of new things all over the place, but it's a mess right now on Windows (with this just being one of the killer issues).
This issue still persist in 2.0.73. And seems to be getting worse... seems like the amount I can paste before it truncates is like less than a dozen lines.
Please... understand how big of a deal this is. You cannot effectively work with this if you can't cut and paste context into the agent. It's really devastating to getting stuff done. I know you are on a tear to implement dozens of new things all over the place, but it's a mess right now on Windows (with this just being one of the killer issues).
I encountered this issue in Windows Terminal. After extensive testing, I think I've figured out the cause. I installed Claude Code via npm and was running it through Node.js. I noticed that the natively installed Claude Code doesn't have this problem. I know the native version is bundled with Bun, so I tried running it with:
bun "C:\Users\yourname\AppData\Roaming\npm\node_modules@anthropic-ai\claude-code\cli.js"
And the issue disappeared.
Or update Node.js to v22.13.0.