claude-code - 💡(How to fix) Fix [BUG] Large paste is silently trimmed — only partial content reaches the input [4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49337Fetched 2026-04-17 08:44:05
View on GitHub
Comments
4
Participants
3
Timeline
8
Reactions
0
Timeline (top)
commented ×4labeled ×4

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Pasting a large block of content into the Claude Code prompt causes the content to be silently trimmed. Only the first portion of what I pasted reaches the input — the rest is cut off with no warning, no indicator, and no "[Pasted text]" placeholder showing the original size.

This is different from the existing paste-collapse behavior (#23134, #29375), where the full content is preserved and just hidden behind a placeholder. In my case the content itself is being truncated before submission, so Claude only receives a partial version of what I pasted. This makes it impossible to reliably share logs, stack traces, diffs, or file contents by pasting.

Version: 2.1.111 OS: Windows 11 (10.0.26200)

What Should Happen?

Restore the previous behavior: when a large block is pasted, collapse it behind a "[Pasted text #N +X lines]" placeholder in the input display, but preserve the full content and send it to Claude in its entirety.

The placeholder UX was great — it kept the prompt clean while guaranteeing nothing was lost. The current behavior silently trims the content, so Claude only receives part of what I pasted. I have no way to tell what made it through and what got cut.

Summary of the regression:

  • Before: paste → "[Pasted text]" placeholder shown, full content sent to Claude ✅
  • Now: paste → content silently trimmed, only partial content sent to Claude ❌

Please restore the placeholder-with-full-content behavior.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a terminal (claude --version: 2.1.111, Windows 11).
  2. Copy a large block of text to the clipboard — e.g., a long log file, a large JSON payload, or several hundred lines of source code (anything more than a few hundred lines / a few thousand characters).
  3. Paste it into the Claude Code prompt (Ctrl+V).
  4. Submit the message.
  5. Observe Claude's response — it only reflects the first portion of what was pasted; the tail is missing.

Previously (in earlier versions), the same paste would show a "[Pasted text #N +X lines]" placeholder in the input and Claude would receive the full content. Now there's no placeholder and the content itself is trimmed before sending.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.111

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

FYI — I'm using Git Bash (MINGW64) running inside Windows Terminal on native Windows. Not WSL

extent analysis

TL;DR

The issue can be addressed by modifying the input handling in Claude Code to restore the previous behavior of collapsing large pasted content behind a placeholder while preserving the full content.

Guidance

  • Verify that the issue is specific to the current version (2.1.111) by checking if the problem persists in earlier versions where the behavior was reported to work as expected.
  • Investigate the input handling mechanism in Claude Code to identify where the content truncation occurs and modify it to preserve the full content while displaying a placeholder for large pasted blocks.
  • Consider adding a character limit warning or indicator to prevent silent truncation and inform users when their pasted content exceeds a certain threshold.
  • Review the differences in input handling between the current and previous versions to understand what changes led to the regression.

Example

No specific code example can be provided without access to the Claude Code source, but the fix would involve modifying the input processing logic to check for large pasted content and apply the placeholder mechanism instead of truncating.

Notes

The solution requires access to the Claude Code source code and understanding of its input handling mechanisms. The exact steps to modify the code cannot be provided without this information.

Recommendation

Apply a workaround by modifying the input handling in Claude Code to restore the previous behavior, as the current version introduces a regression that silently truncates pasted content.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING