[BUG] Multi-line text on is truncated when pasted into prompt field (on Windows)
Open 💬 26 comments Opened Aug 3, 2025 by yhslai
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- 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...
26 Comments
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).
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.
this has been present since i started using it, roughly may or june 2025. its frustrating because you cant see what is cut off until you send the prompt.
OK this is driving me nuts. Same issue. Claude code set up in terminal in Cursor.
Copying a prompt from another Agent/place and pasting it (or just content) it gives the lines summary but even if the lines are right sometimes it truncates. I am wondering (Did it get it all and it's truncating only in view? am I giving half and 75% prompts trying to build?
This is not okay, we need to know what's going on - does the prompt truncate after a certain amount of characters, or is it just hiding the rest of the prompt in the view? This has been going on for a while, and I can't use bun Im using npm / npx and expo and a Node version that's compatible with the rest of my stack. But I don't see how that could be the root cause.
You try updating nodejs to the latest version to try it, I solved it by this method, or you try using bun
Still experiencing this on Windows 11:
NPM version: 11.3.0
Node version: v24.1.0
Claude Code: v2.1.12
Terminal / Powershell.
In the meantime I'm having to paste my prompt into a file and have it read the file. Or paste it in multiple parts (hitting escape each time).
Still dealing with this today - Win 11 in VS Code
this appears to be fixed in 2.1.37
Still Present on v2.1.63 — Windows 11, npm Install, Node.js v22.12.0
Confirming this paste truncation bug is alive and well on v2.1.63.
Environment:
Behavior:
Pasting text from outside the terminal — browser, Notepad, VS Code output panels — into the Claude Code input consistently captures only a portion of the text. The source doesn't matter; if it's coming from outside the terminal, it gets truncated. This does NOT happen in the regular terminal prompt — only inside Claude Code's input handler.
The "[Pasted text +N lines]" display compounds the problem. Since the pasted text is collapsed behind that summary line, there is no way to verify completeness before hitting Enter. You submit, Claude responds based on partial input, and only then do you realize half your paste was silently dropped. You have to re-paste, hope it works, or resort to the file workaround (@rcbyron's approach of pasting into a file and having Claude read it).
Multi-session impact: I run 4-6 concurrent Claude Code sessions daily (ML training, bug management, paper trading, backtesting). I'm constantly pasting crash logs, code snippets, error output, and stack traces between windows. Every truncated paste means stopping the current task, verifying what was lost, re-pasting (sometimes multiple times), or falling back to the file workaround. Across 4-6 sessions this adds up to significant lost time every single day.
Node.js version note: Based on reports in #13328 that newer Node.js versions resolve this, I'm about to upgrade from v22.12.0 to v24.14.0. Will report back on whether that changes anything. @lehhair's suggestion to use Bun is not viable for my setup since I need npm for the rest of my toolchain.
Related issues: #13328 (paste truncation with small input), #3134 (bracketed paste mode corruption). All three issues describe variants of the same underlying problem — Claude Code's input handler does not reliably receive the full content of terminal paste operations.
@shefben reported this fixed in v2.1.37, but it's clearly not fixed universally — still reproducible on v2.1.63 with Node.js v22.12.0 on Windows.
I've actually noticed it's gotten worse. It can grab the copy like 75% of the time for me. It gets it after a few tries.
Paste Truncation: Still Broken on v2.1.62 + Node.js v24.14.0
Environment: Windows 11, Claude Code v2.1.62 via npm (Node.js runtime), Node.js v24.14.0 (upgraded today specifically to test the community claim that v24 fixes this).
Result: v24 does NOT fix it.
The Discovery That Should Terrify Every User
I just pasted a block of text into Claude Code. It captured 93 lines out of ~120 — silently dropping the tail ~22%. No error. No warning. The
[Pasted text +N lines]collapsed display showed the truncated line count as if it were the full content.This is not a fixed buffer cutoff. Looking across reports:
The truncation is proportional/percentage-based, not a fixed line or character limit. This is consistent with a race condition in the Ink TUI's stdin event processing — the amount captured depends on how quickly the input handler processes data before the paste stream buffer is flushed or the event loop moves on.
The Silent Data Corruption Problem
Here's what makes this a P0 data integrity bug, not a minor UX annoyance:
[Pasted text +N lines]— the displayed line count is the TRUNCATED count, not the original. There is zero indication that content was dropped.I've been pasting error logs, code blocks, configuration files, and instructions into Claude Code for months. I now have to question every single paste interaction. How many bugs were "fixed" based on incomplete error output? How many instructions were followed incorrectly because the last 20% was silently dropped?
24 Issues, 8 Months, Zero Staff Responses
I've tracked 24 separate issues across this paste-handling bug family:
Open: #5017, #3134, #24431, #22226, #3412, #15199, #25924, #28137, #24418
Auto-closed by stale bot (NOT fixed): #13328, #13125, #21461, #18672, #20560, #24077, #22402, #11611, #13183, #14379, #16817, #8812, #3007, #12298
The oldest report (#3007) is from July 5, 2025 — 8 months ago.
Not a single Anthropic employee has commented on ANY of these 24 issues. The only "responses" are from the stale bot auto-closing them after 30 days, and the duplicate bot fragmenting the bug trail by pointing issues at other unfixed issues.
The Five Failure Modes (Same Root Cause)
This isn't one bug — it's five manifestations of broken paste handling in the Ink TUI:
\e[?2004hnot cleaned up on exit, corrupts terminalWhat Needs to Happen
process.stdindata events. The handler is not properly reassembling the full bracketed paste content before processing. This is a known pattern in Node.js terminal applications.\e[200~and\e[201~against what was actually inserted into the input buffer.This is a silent data corruption bug that has been affecting every user for 8 months. The fact that the
[Pasted text]UI actively hides the problem makes it worse — users don't know they're feeding Claude incomplete data until they get wrong results and can't figure out why.cc @anthropics/claude-code-team
@ThatDragonOverThere @ruth-anthropic
There's no way...I can't believe this, but I do...because it makes complete sense now. This is crazy... @claude Can you refund my last 8 months please?
@claude seriously, you need to reach out to me as this is bug is considerably dangerous and garbages all of my projects (at least current state).
it is strange you guys are still having the issue, it has been working for me for almost a month now, havent had any truncation. im on windows 10 with version 2.1.69 using claude code cli (not the gui app)
I should also mention, using windows terminal which uses power shell 7
Hi everyone, it's wild that I had to use literal Claude to scour the deepest secrets of the internet.
But we figured out that I literally just had to update the node version and now the pasting is working But I can confirm that I had the error. Here is the fix process from Opus:
🔧 Fix: Update Node.js to v22+
Paste truncation on Windows? Your Node.js is too old.
node --version # probably v20.x 😬
Fix:
winget install OpenJS.NodeJS.LTS"Still reproducing on v2.1.81 (Windows, Node.js, CLI).
Pasted text silently truncated — tail end cut off with no error or warning. Same percentage-based truncation (~22% dropped) documented in prior comments.
This bug has been open since July 2025. 24+ related issues across 5 distinct failure modes. Zero Anthropic staff responses on any of them in 9 months.
v2.1.81 shipped "Fixed a race where fast Cmd+Tab followed by paste could beat the clipboard copy under tmux" — a paste-adjacent fix that did not address the core truncation issue.
For a tool where pasting code, configs, and data is a primary input method, silent data loss on paste is a P0 bug.
Still reproducing on v2.1.85 (Windows, Node.js, CLI). 9 months unfixed.
User pasted a structured table (position tracking fields from a code audit —
current_pnl_pct,peak_pnl_pct, column mappings, update logic descriptions) plus agent task status. 89 lines silently truncated mid-paste:"… +89 lines …". The truncated content was decision-relevant — it contained the field definitions needed to review an agent's work.This hit simultaneously with #26954 (output collapse) in the same message. The user pastes content → it gets truncated. The agent responds → its output gets collapsed. Both directions of information flow are now broken.
Timeline:
This is a CLI tool where the primary input method is pasting text. 9 months without a fix for the primary input method being broken is difficult to understand. The workaround is "paste less" — which defeats the purpose of a CLI interface for working with code.
System: Windows 11, Node.js, Claude Code v2.1.85
Reporting the same issue — still broken as of April 14, 2026
I've been working continuously with Claude Code for 30 days without any paste issues. Starting today (April 14, 2026), I'm experiencing both symptoms described in this thread:
This is a clear regression. The same workflow that worked without interruption for a month is now broken. Adding a 👍 to this issue and requesting that Anthropic prioritizes a fix — this is a core input mechanism and it's actively blocking development work.
Still happening in 2.1.109 on Windows 11 + Windows Terminal + PowerShell 5.1. Pasting multi-line content (anything beyond ~10 lines) fails silently — input is truncated or rejected entirely with no visible error. Workaround: write the content to a file and tell Claude to read the file. Right-click paste in cmd.exe sometimes works for shorter content but is also unreliable for multi-line. This is a real productivity tax for any workflow that involves moving terminal output, code snippets, or error messages into Claude prompts. Would prioritize a fix.
Reporting the same issue — still broken as of April 14, 2026
I've been working continuously with Claude Code for 30 days without any paste issues. Starting today (April 14, 2026)
Still broken. Does anyone care?
did you guys update your note.js? that seems to solve the issue for alot of people, from what i see here and what ive seen on reddit and a few other places.