Skip to content

Feature Request: Option to disable paste text collapse in input field #23134

@wesleysmyth

Description

@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:

  1. Paste text from another source (error messages, code snippets, requirements)
  2. Want to review what I pasted before sending
  3. 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 /expand slash command - this only works after submission, not in the input field
  • Hooks - no paste event 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions