Feature Request: Option to disable paste text collapse in input field
Open 💬 45 comments Opened Feb 4, 2026 by wesleysmyth
Summary
When pasting multi-line text into the Claude Code prompt input, the UI collapses it showing [Pasted text #N +X lines]. While this is a nice space-saving feature, it makes it difficult to review pasted content before submitting.
Problem
As a user, I often:
- Paste text from another source (error messages, code snippets, requirements)
- Want to review what I pasted before sending
- Cannot see the full content because it's collapsed
This is especially problematic when:
- Recovering text after a crash (took a photo of screen, OCR'd it, want to verify accuracy)
- Pasting code that may have formatting issues
- Combining multiple pasted sections into one prompt
Proposed Solution
Add a configuration option to control paste collapse behavior. Options could include:
Option A: Global Setting
// settings.json or .claude/settings.json
{
"input": {
"collapsePastedText": false // default: true
}
}
Option B: Keyboard Toggle
Ctrl+Shift+E(or similar) to expand/collapse pasted text in the input field- Or a visual indicator that's clickable to expand
Option C: Threshold Setting
{
"input": {
"collapsePastedTextThreshold": 20 // only collapse if > 20 lines, 0 = never collapse
}
}
Workarounds Attempted
- Creating a
/expandslash command - this only works after submission, not in the input field - Hooks - no
pasteevent hook available
Environment
- Claude Code CLI
- macOS / Linux terminals
- Various terminal emulators (iTerm2, Terminal.app, Warp, etc.)
Additional Context
This would significantly improve the UX for users who frequently paste content and want to verify it before sending. The current behavior optimizes for visual cleanliness but sacrifices reviewability.
---
Happy to contribute a PR if someone can point me to where this UI behavior is implemented!
45 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
In the latest version (v2.1.34), they've decreased the threshold above which the pasted text is hidden in the input. It's much lower now and this is impacting my productivity big-time.
Please implement this feature!
Supporting this as a voice input user
I just commented on #3412 with more details, but wanted to +1 here as well since this issue specifically focuses on the configuration aspect.
I use voice-to-text dictation as my primary input method in Claude Code on Windows. The
[Pasted text #1 +N lines]collapse makes it impossible to verify whether my voice transcription is accurate before submitting — which is critical since speech recognition often produces errors.I can confirm what @PaulRBerg reported: the collapse threshold was noticeably lowered in recent versions. Even short inputs (3-4 lines) are now collapsed, making the problem much worse than before.
Proposal C (configurable threshold with
0 = never collapse) from the issue description would perfectly solve my use case. A simple toggle like"collapsePastedText": falsewould also work.disable_paste_summarycompact_paste(seecopilot help config's output)I can't understand how this is the default with no override in CC when @bcherny himself uses dictation the whole time.
yep, it's really bad UX to see this
!Image
Vote for this. This drives me bananas. Let me copy a prompt, kill a session, relaunch Claude, and paste and continue editing. Not allowing this, somehow, in any way, is utter divine madness. I have wasted an hour on this! Absolutely unhelpful and unexpected. I'm a big boy. I know how to edit multiline interactively. I'm not scared of it. That's arguably all Claude Code is!
yep, very bad UX. what happened to Claude Code as of lately? the UX has gotten worse.
I ended up switching to the VS Code integration (CC plugin) just to be able to edit the prompt without an hour of trying to work around weird Terminal blaming CC blaming Terminal hogwash
When dictating into Claude Code, it automatically collapses into [Pasted Text]. This immediately disallows the user from being able to see if what they've dictated is correct and accurate.
People who rely on dictation for any number of reasons including disability can no longer effectively use this.
This isn't a feature request, it's a request to fix a BREAKING CHANGE.
Overall, the design choice of hiding pasted text into a powerful AI agentic system, and not having that be configurable… That is bananas to me.
We may be seeing the "Claude is building Claude" effects. No way this kind of UX nightmare should have made it this far.
I really struggle to understand the product design rationale behind this.
In 90% of cases, I want the pasted text to be visible. It's only when I paste some random error from Sentry or something really verbose that I want it hidden.
+1
It is extremely annoying that there is no easy way to override this behavior
Painful that this can happen with as little as four characters. Can replicate this behavior in v2.1.59 with as little as this:
I really want this to be fixed. The
[Pasted text #N +X lines]is driving me crazy. I want to be able to see what is pasted.+1 for threshold, would like it to be more like 15 lines than 4
Not ideal, but I managed to use
tmux send-keys -t <pane> "$(xclip -selection clipboard -o)"to get the clipboard contents "typed" into claude code when it's in<pane>(e.g. 0) inside tmux.Suggestion: "Cmd+Shift+V" on mac to paste inline instead of collapsed?
@jorgemartins-uon no. I don't want to have to learn a special pasting command just for Claude Code.
This feature is bonkers. Pasted text should appear normally by default.
If you use voice-to-text tools that paste via clipboard + Cmd+V, VoiceInput-Patch can work around this. It intercepts Cmd+V in terminals and re-types the content character-by-character via CGEvent Unicode key events — since the terminal sees keyboard input rather than a paste, the text shows up inline without being collapsed into a "[Pasted text]" block.
Anthropics UIUX team is shit. VSCode extension cannot rewind conversation. TUI is completely broken.
@Da1sypetals that's not true and I think we should be grateful to Anthropic for creating a product as awesome as Claude Code.
however, we do have to criticize them for leaving us in the dark here in these GitHub issue threads. There's a dearth of human responses, and this is not OK.
What's interesting to me is, the Claude Code CLI is without a doubt the single greatest developer tool released in my lifetime, and yet it has this absolute boneheaded UX experience around an extremely common use case that greatly impairs one's ability to use it.
Imagine if VSCode and IntelliJ had this "feature" when you pasted text into the editor. The experience in Claude today is about as frustrating as that.
This is very bad UX and hitting me all the time. Integrate some full-featured editor widget inside Claude Code instead of trying to reinvent the wheel in various bad ways. Proper, performant multi-line code boxes long have been a solved problem.
This has many duplicates and they're getting closed. It is because this issue is important, that's why it is so "popular" on the bug tracker. Please handle it instead of just auto-closing the tickets.
there is a cheat for this..
kinda hacky but works, but yeah native setting would be much better LOL
Yup. Still an issue. It is an obvious bug/error, so it needs to be fixed, instead of keeping a broken version.
Cmd+Shift+Vis not new - it’s the standard macOS shortcut for Paste and Match Style, which in many cases effectively means pasting as plain text.I like the collapsed paste option because it can make things look less messy, but I also want a quick way to paste plain text when needed. I do not want to switch this in settings every time - a simple shortcut would be much better.
I would also be happy with the reverse: default
Cmd+Vfor plain text andCmd+Shift+Vfor collapsed paste. My main point is that this should be something you can choose on the fly, not through a fixed config change.This has been incredibly annoying for me as well.
Just the other night I was in the middle of writing a detailed reply to CC in order to generate a test plan. I decided I would finish my reply at another time because I had to do something else first. Because this long reply was never sent to Claude, I had to copy and paste it and it automatically collapses it, meaning I can not edit it anymore. If I want to make edits to the text I need to type it all from scratch.
This is not the first time this happens. My personal preference would be to have the text expand and collapse in a similar way we show CC's full thought process (ctrl+o), though keep them separate.
I found a workaround that works for me, although it is not without side effects. In vim mode, if you press ^G it will open the prompt in a vim editor, and you can paste and edit to your heart's content. The only problem is that shift-enter may be broken for the rest of your session once you send that prompt.
I ran into the same issue and hacked together a workaround using Hammerspoon — it intercepts Cmd+V in terminal apps and types the clipboard content as keystrokes instead of pasting, so Claude Code doesn't fold it.
Been using it for a while with Typeless and it works well. Try it out if you're on macOS: https://github.com/cyrus-cai/claude-code-paste-enhancement
Nice, thank you cyrus, I'll check this out.
On Mon, Mar 30, 2026 at 8:47 AM Cyrus Cai @.***> wrote:
--
James King
GPG Fingerprint: 8C14 02C6 3208 D552 D22C F4C6 9240 A9D0 6827 468B
@cyrus-cai if it wasn't for losing the new line chars I'd say this would do it, but pasting a ton of text that sometimes is inherently newline-dependent (think CSV), doesn't help. It becomes illegible therefore hard to edit, which is one of the main arguments here to have the text pasted as is.
And the token consumption of this can be higher than $1 just to edit pasted text.
Workaround: Hammerspoon-based paste enhancement (macOS)
I built a working solution using [Hammerspoon](https://www.hammerspoon.org/) that bypasses the bracketed paste detection while preserving formatting (newlines, UTF-8 characters including diacritics).
How it works
Instead of a normal
Cmd+V(which triggers bracketed paste - Claude Code folds it), Hammerspoon intercepts the keypress and types the clipboard content line by line usinghs.eventtap.keyStrokes(), withShift+Enterbetween lines to insert newlines without triggering submit.Key design decisions after several iterations:
hs.timer.doEveryinstead of chaineddoAfter- recursive timer chains would break after ~10-15 lines. A single repeating timer is reliable.keyStrokesper line, not per character - character-by-character was too slow and still dropped characters. Full-linekeyStrokesworks well with 80ms intervals.MAX_LINES(default: 50) fall through to normal paste (Claude Code folds as usual). This keeps long pastes fast while short/medium ones display inline.Setup
brew install --cask hammerspoonhs.timer.doAfter(3, function() print(hs.application.frontmostApplication():bundleID()) end)then switch to your terminal within 3 seconds)~/.hammerspoon/init.luaMAX_LINESandTICK_INTERVALto tasteThe script
Notes
Shift+Enterhere) depends on your Claude Code keybinding for multi-line input. Check your config and adjust if needed.Cmd+Shift+Vforces type-paste in any app (not just terminals).@that-lucas I tested @plopot's approach, it seems nice.
@plopot would you like to open a PR at https://github.com/cyrus-cai/claude-code-paste-enhancement?
Thanks @plopot for the improvement on top of @cyrus-cai's solution. I'll be using this for the time being.
But let's agree that having to have one more startup app installed consuming RAM just to solve this - and not in a good way - is a total PITA.
For those reasoning about that
local TICK_INTERVAL = 0.08 -- 80ms between lines, I managed to get down to 0.025, lower than that it won't line break.Please fix this collapse, I want to edit my pasted text and I can't
It's hard to describe how much I hate this "pasted text" collapse feature 😆 I want to see exactly what I pasted and be able to edit it. Would absolutely love a setting to be able to turn this off, or at least be able to set the threshold really high, it's enabled now for even tiny amounts of text.
This is resolved. ✅
Now, when you paste something big it initially comes up as
[Pasted text #5 +24 lines]and a new tooltip appears below:paste again to expand<img width="1847" height="215" alt="Image" src="https://github.com/user-attachments/assets/86d31088-1d65-4e99-a262-b19285d44467" />
If you repeat your paste command again, then it expands.
TLDR
Just hit
Cmd + V + Cmd + Vand it will expand the text automatically.Observed on MacOS, Claude Code @
v2.1.116running via npx.@that-lucas that's an OK-ish workaround but it's still a bad UX when pasting snippets. For example, I am using Raycast Snippets. 'Pasting again' means re-running the same snippet. Snippets may have input arguments so I need to enter multiple inputs again.
There should be a boolean setting (in
settings.json) for disabling this behavior.<img width="1496" height="604" alt="Image" src="https://github.com/user-attachments/assets/573cba93-6aa3-4953-a354-8d316d5cd836" />
+1 — this is a significant UX issue for me too. I use Claude Code in VS Code's integrated terminal and frequently paste multi-line text (error logs, code snippets, longer prompts). Being unable to review or edit the pasted content in place forces clunky workarounds (write to a tmp file then
@file, or open an external editor viachat:externalEditor).Option A (
input.collapsePastedText: false) would be the ideal per-user opt-out. Option C (threshold) is a nice secondary. The current threshold also seems to trigger well below the documented 10k-character limit — even pastes of a few hundred chars across ~4 lines get folded, which is surprising.Would love to see this prioritized.
Adding a concrete use case for this: I use a speech-to-text tool (Typeless) for dictation. It inserts dictated text by pasting, so any multi-line dictation gets collapsed into
[Pasted text #N +X lines]— which means I can't review or correct the transcription before sending. For dictation this isn't cosmetic, it's a real usability/accessibility problem: the whole point is to see and edit the transcribed text inline.A
collapsePastedText: falseoption (or a configurable threshold, or a keybinding to expand a placeholder inline) would fix it. +1.@maciejszarski1 not sure how Typeless "pastes" the content into the focused field, but if it has strategies on how to do this (like Handy has) you can set it to use Cmd + V and keep the content in the buffer, so after you stop talking/use your keyboard shortcut to transcribe, the content is inserted, then the
[Pasted ...]placeholder appears, and you can Cmd + V to paste the text a second time which will then expand and show you.Thanks @that-lucas. Unfortunately, I don't think Typeless lets you paste the dictated text again.
repeating a comment from another issue: https://github.com/anthropics/claude-code/issues/3412#issuecomment-4791722403
Cmd+V, Cmd+Vis not a good solution:Why software has to assume things from the user? That is a horrible decision. If you assume people want to make these kind of placeholders , and you assume that this feature should be enabled by default . Then at least you should provide of a Flag , Config file directive in order to disable this.