← Claude Code Hub
✦ Tip #170 Aug 19, 2026

Expand pasted text in Claude Code: get back the 200 lines it just swallowed

You paste two hundred lines of log, Claude Code turns them into [Pasted text #1 +200 lines], and now you cannot read or fix what you are about to send.

Claude Code prompt with a paste collapsed into [Pasted text #1 +200 lines] next to the same prompt expanded back into log lines, the paste again to expand hint, the Ctrl+G external editor shortcut and the 100,000 character and 30 day limits

TL;DR Paste the same content again and the [Pasted text #1 +200 lines] chip opens up inside the prompt, editable, cursor at the end. No keyboard shortcut expands it inside the prompt, the gesture is the only way. Claude Code collapses any paste over 800 characters or two lines, and the paste again to expand hint is easy to never see. To work on the text properly, Ctrl+G opens the whole prompt in your editor with everything already expanded.

You paste two hundred lines of log into the prompt and Claude Code swallows them. Where your text was, you now have this:

> [Pasted text #1 +200 lines] look at this connection error

The content is still there and goes out in full when you hit Enter. You just cannot see it. And if you suspect you pasted the wrong trace, or that a credential slipped in with it, there is no obvious way to check before you send.

Why the prompt swallows it

The threshold is in the official docs: more than 800 characters or more than two lines, and the prompt swaps your paste for a numbered chip so the input box stays usable. The full content is written to ~/.claude/paste-cache/, one file per paste, and that is what gets sent when you submit.

That chip number is not reserved for text pastes. It comes from the same counter that hands out [Image #N] when you paste a screenshot with Ctrl+V, so a long log takes a number you were expecting for your next image.

Paste it again and it opens

Copy the same content and paste it straight over the chip. Claude Code compares what arrives from the clipboard against what it stored and, on an exact match, replaces the chip with the real text inside the prompt, cursor at the end:

> 2026-08-19 10:41:02 ERROR  connection refused: 127.0.0.1:5432
  2026-08-19 10:41:02 ERROR  retry 1/5 in 200ms
  2026-08-19 10:41:03 ERROR  retry 2/5 in 400ms
  ...

Now you can read it, trim it, or delete the line you did not mean to send. The two blocks above are a reconstruction of the prompt rather than a capture, since the terminal will not photograph itself from the inside.

Claude Code does hint at this with a dim paste again to expand under the prompt, but the hint is quiet and conditional: the terminal needs at least 90 columns for it to appear in the shortcut line. In a narrow window you will never see it, and the gesture works exactly the same.

Two limits worth knowing:

  • It expands the highest-numbered paste still available in the prompt, not one you pick.
  • Above 100,000 characters it never expands. For a whole file, save it to disk and hand Claude the path instead.

To actually edit it: Ctrl+G

Re-pasting is for reading and fixing a line or two. When you want to work the text over, Ctrl+G (or Ctrl+X Ctrl+E) opens the entire prompt in your $EDITOR with every paste already expanded. Edit it in vim, VS Code or whatever you have set, save, and on the way back it collapses into its chip again.

export EDITOR=nvim   # or code -w, or whatever you use

This is the route people were after in the issues asking for a shortcut to expand the chip. No such shortcut exists: of the keyboard actions Claude Code exposes, the only paste-related one is for images. Expanding in place is a gesture, and the external editor is the front door.

Where it lives in the meantime

ls -la ~/.claude/paste-cache/     # one .txt per paste, mode 600

Each file gets a hex name and holds the paste in plain text. That is what lets you recall a prompt from history in a later session and have it resubmit with its full content.

It also has an expiry date. The retention sweep deletes these files the same way it deletes the plain-text conversations under ~/.claude/, 30 days by default. When you recall an old prompt whose paste is gone, Claude Code never sends the literal [Pasted text #N] string: it tells you which paste is missing and, if dropping it would change what runs, it cancels the submission and leaves your prompt untouched so you can fix it.

Reference

Detail Value
Collapse threshold Over 800 characters or over 2 lines
Version checked 2.1.235
Expansion ceiling 100,000 characters
Minimum width to see the hint 90 columns
Where it is stored ~/.claude/paste-cache/, one .txt per paste
Retention Whatever cleanupPeriodDays says, 30 days by default

Official docs: Configure your terminal (Paste large content)

Workshop for teams

Multiply your team's output without sacrificing quality: a 6 to 8 hour AI First workshop, online, on the Claude platform.

See the workshop
Free guide

The 51 essentials, as a PDF.

One page per tip. Five chapters. What I actually use daily in production — no theory, no fluff.

  • I. Getting started 10 tips
  • II. Awareness 3 tips
  • III. Mastery 22 tips
  • IV. Autonomy 10 tips
  • V. Comparison 6 tips
Are you a professional Web developer?

You'll receive the guide by email · You join the Gravitas newsletter · Unsubscribe anytime

of 51
#

Wmedia · 51 Tips
Free guide · 51 tips · 5 chapters

The 51 essentials, as a PDF.

Are you a professional Web developer? · Unsubscribe anytime