claude-code - 💡(How to fix) Fix [BUG] [Windows 11] Pasting >25 lines into CLI input is truncated intermittently [1 comments, 2 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#46953Fetched 2026-04-12 13:28:48
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1unlabeled ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

  • Other AI CLI tools (e.g., Codex) in the same terminal with the same input method handle the same content without truncation
    • The issue is not consistent — identical input sometimes passes, sometimes fails
    • Workaround: writing content to a file and using the Read tool
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?

Environment

  • OS: Windows 11
  • Claude Code version: (2.1.104)
  • Terminal: (填你用的终端,如 Windows Terminal / CMD / PowerShell)

Bug Description

When pasting text longer than approximately 25 lines into the Claude Code CLI prompt, the content is truncated — Claude only receives a partial message.

The issue is intermittent: the same content, same terminal, same input method sometimes works and sometimes fails.

Steps to Reproduce

  1. Open Claude Code CLI in any terminal on Windows 11
  2. Paste a block of text that is 25+ lines long
  3. Submit the message
  4. Observe that Claude's response indicates it only received partial content

Expected Behavior

Full pasted content is received and processed by Claude.

Actual Behavior

Content is truncated. Claude receives only part of the pasted text (appears to cut off around 25 lines).

Additional Context

  • Other AI CLI tools (e.g., Codex) in the same terminal with the same input method handle the same content without truncation
  • The issue is not consistent — identical input sometimes passes, sometimes fails
  • Workaround: writing content to a file and using the Read tool

What Should Happen?

Pasting any length of text into the Claude Code CLI prompt should be received in full by the model, consistent with the behavior of other AI CLI tools running in the same terminal environment.

Error Messages/Logs

Steps to Reproduce

  1. Open any terminal on Windows 11 (e.g., Windows Terminal)
  2. Start Claude Code CLI
  3. Paste 25+ lines of text into the input prompt
  4. Submit

Actual Result: Claude only receives partial content — truncated around 25 lines

Expected Result: Claude receives the full pasted text

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.104

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue with text truncation in the Claude Code CLI prompt when pasting long text may be related to a limitation or bug in the current version, and a potential workaround is to write the content to a file and use the Read tool.

Guidance

  • Verify that the issue is indeed version-specific by checking if other users have reported similar problems with version 2.1.104.
  • Test the Read tool workaround with different file sizes and contents to ensure it consistently works as a temporary solution.
  • Investigate if there are any terminal or OS settings that could be contributing to the intermittent nature of the issue.
  • Consider reaching out to the development team or checking the project's issue tracker for any known issues or fixes related to text truncation.

Notes

The lack of information about the last working version and specific error messages/logs limits the ability to provide a more targeted fix. The inconsistency of the issue and the fact that it sometimes works with the same input suggest that there might be multiple factors at play.

Recommendation

Apply workaround: Given the information provided, using the Read tool to process text from a file seems to be a reliable workaround for the text truncation issue until a more permanent fix is available.

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

claude-code - 💡(How to fix) Fix [BUG] [Windows 11] Pasting >25 lines into CLI input is truncated intermittently [1 comments, 2 participants]