[BUG] Claude Code win desktop app - Code fence input box drops pasted lines with CRLF line endings (Windows regression in v1.6259.1)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When pasting Windows terminal output (Git Bash, PowerShell, or CMD) into an explicit triple-backtick code fence in the Claude Code input box, only the first line lands inside the fence. All remaining pasted lines appear below it as plain text outside the fence.
This is technically a regression introduced in Claude Desktop v1.6259.1 (updated 2026-05-06). Prior to this update, pasting placed plain text in the input box and rendered post-send — there was no live code fence renderer that could break on line endings.
$\small \color{gray} \textit{\{note from "Last Working Version": this instant live renderer feature wasn't in there before. Pasting worked — plain text, rendered post-send.}}$ [1]
### Technical regression note _The live renderer is new and welcome — the issue is specifically CRLF from terminals, not the feature itself._
Root cause confirmed: Windows terminals write CRLF (\r\n) to the clipboard. The new live input renderer introduced in v1.6259.1 does not handle the carriage return (\r) — it appears to close the code fence context at the \r, causing the remainder of the line and all subsequent lines to fall outside the fence.
Current Behavior
Only the first pasted line lands inside the fence. Subsequent lines break out and appear as plain text below the fence. The number of lines "escaped" equals the total pasted lines minus one.
<img width="300" height="143" alt="Image" src="https://github.com/user-attachments/assets/76788ae1-99dd-4f8d-bb28-0b6fd3c87664" />
<img width="300" height="134" alt="Image" src="https://github.com/user-attachments/assets/cf05aeea-7122-4c03-b4e9-4d84fe213f1f" />
<img width="300" height="103" alt="Image" src="https://github.com/user-attachments/assets/b64ffb31-7c9d-4903-adf6-fea6d891bad5" />
What Should Happen?
All pasted lines should remain inside the code fence, as in Claude Chat section of desktop app:
<img width="300" height="143" alt="Image" src="https://github.com/user-attachments/assets/edc4cebc-5d63-432a-bea0-4255231a1c20" />
<img width="300" height="212" alt="Image" src="https://github.com/user-attachments/assets/e982e19a-229b-4508-ac78-888682b49d8f" />
<img width="300" height="121" alt="Image" src="https://github.com/user-attachments/assets/3ac707a1-8ed7-42f5-b5d2-002b47c03083" />
Error Messages/Logs
# Log Evidence
The renderer process log (`claude.ai-web.log`) identifies the input editor as **ProseMirror** (`prosemirror-view`). Two findings are relevant:
1. A recurring warning notes that `prosemirror.css` is not fully loaded — specifically that `white-space: pre-wrap` is not set. ProseMirror's own documentation flags this as affecting whitespace handling.
2. A ProseMirror crash was logged at `2026-05-06 16:48:53`, immediately after a CRLF paste session:
Uncaught TypeError: Cannot read properties of undefined (reading 'nodeSize')
`nodeSize` is a ProseMirror document-node property accessed during tree traversal. This error indicates a node in the document model was undefined — consistent with a `\r` character producing an invalid node structure during the paste transform.
Steps to Reproduce
- Open Claude Desktop on Windows (v1.6259.1).
- In the input box, type ``` (three backticks) to open a code fence — observe the live fence rendering activates.
- Open any Windows terminal: Git Bash, PowerShell, or CMD.
- Run any multi-line command (e.g.,
git log --oneline -5) and copy the output to clipboard. - Paste into the code fence in the Claude Code input box.
- Observe: only the first line of the pasted content is inside the fence. All subsequent lines appear as plain text below the closing fence.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.5354.0 - see note [1] in the "What's Wrong? *" field
Claude Code Version
2.1.128 (bundled in Claude Desktop 1.6259.1) Standalone CLI: 2.1.119
Platform
Other
Operating System
Windows
Terminal/Shell
Other
Additional Information
Environment:
- Claude Desktop: 1.6259.1 (updated 2026-05-06, Windows 11)
- Bundled Claude Code (CCD): 2.1.128
- Standalone Claude Code CLI: 2.1.119
- OS: Windows 11 Home 10.0.26100
- Affected terminal sources: Git Bash, IDE integrated Git Bash in Rider, PowerShell, CMD (all produce CRLF)
- Not affected: JetBrains Rider open .cs doc as source, a copy-pasted code block renders fine with all code block labels, including no label:
<img width="500" height="158" alt="Image" src="https://github.com/user-attachments/assets/db0bc294-dbe2-423f-aa08-6760d11fe761" />
Workaround:
Confirmed workaround: paste terminal output into VS Code first, which converts CRLF to LF on paste, then copy from VS Code and paste into Claude Code — all lines land correctly inside the fence.
Another workaround is pasting the terminal output to Claude Chat, sending it, and copy the rendered, sent prompt back to Claude Code and then sending it there. That also renders properly in the live renderer, and in sent prompt.
The live renderer is new as of v1.6259.1. The previous version (1.5354.0) did not exhibit this behavior because there was no live fence rendering in the input box.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗