[BUG] "Paste again to expand" missing from the agents-view composer — re-pasting creates a second [Pasted text #N] placeholder instead of expanding

Open 💬 0 comments Opened Jul 9, 2026 by pradeep-mj

Environment

  • Claude Code v2.1.204 (CLI, native install)
  • macOS (Darwin 25.5), terminal TUI

Summary

The regular REPL input supports expanding a collapsed [Pasted text #N +M lines] placeholder by pasting the identical text again (with the dim "paste again to expand" hint). The agents-view composer (claude agents) does not: any paste over the collapse threshold always mints a brand-new placeholder, so re-pasting the same text yields [Pasted text #0 +N lines][Pasted text #1 +N lines], and there is no way to view or edit the collapsed text before dispatching. Users who learned the re-paste gesture in the REPL experience this as a silent regression when they move to the agents view.

Steps to reproduce

  1. claude agents
  2. Paste ~1–5k chars (more than 2 lines) into the composer → collapses to [Pasted text #0 +N lines]
  3. Paste the exact same text again

Expected (REPL behavior): the placeholder expands inline for small edits before submitting; a "paste again to expand" hint is shown after the first paste.

Actual: a second placeholder is appended; no hint is ever shown; the collapsed content cannot be viewed or edited in the composer.

Analysis (v2.1.204 bundle)

  • The expansion helper (JRc, 100k-char cap) has exactly one caller in the whole bundle — the REPL input's paste handler (if(H[Wo]?.type==="text"&&H[Wo].content===sn&&C3(Wo))return;).
  • The fleet/agents-view composer's onPaste unconditionally creates a new placeholder for pastes over 800 chars or 2 lines — no comparison against the previously stored paste, no expansion path.
  • The "paste again to expand" hint component is rendered only via the REPL prompt-footer chain; the fleet view never renders it or any equivalent.

Ask

Feature parity: support paste-again-to-expand (and its hint) in the agents-view composer — or provide any way there to view/edit a collapsed paste before dispatch.

Broader context: #3412 (view/edit pasted-text blocks generally).

🤖 Generated with Claude Code

View original on GitHub ↗