[BUG] Teammate receives "[Pasted text #N]" placeholder instead of the actual pasted content

Resolved 💬 3 comments Opened Apr 17, 2026 by jonleung Closed May 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

Workflow Context

My primary use of agent teams is talking directly with individual teammates — treating each teammate as its own full Claude Code session, as the docs describe ("Each teammate is a full, independent Claude Code session"). A core part of that direct-conversation workflow is pasting things into a teammate: code snippets, error output, notes I want it to review, longer instructions, etc. This bug breaks that: the teammate only sees the placeholder [Pasted text #N] rather than what I actually pasted, so I can't reliably hand nuanced content to a teammate the way I can to a normal Claude Code session.

What's Wrong?

When I paste text into a teammate's prompt (teammate = subagent in a team created via TeamCreate), the teammate only receives the placeholder token (e.g. [Pasted text #2]) and not the actual pasted content. The teammate reads back the literal placeholder string as if it were my message.

Actual exchange I saw:

❯ [Pasted text #2]

⏺ I don't see the pasted text — it didn't come through on my end, just the placeholder [Pasted text #2].
  Could you resend the content?

So the pasted content is being elided/substituted somewhere between the team leader UI (where the paste is captured and shown with a placeholder reference) and the teammate's actual context — the placeholder never gets expanded back into the real content before being delivered.

I don't know whether this is deterministic or intermittent — it's happened more than once, but I haven't isolated the conditions.

What Should Happen?

The teammate should receive the actual pasted content, the same way the team leader does. Either the placeholder should be expanded on the way to the teammate, or the paste should be delivered inline to the teammate in the first place.

Error Messages/Logs

No error — this is a silent data-loss bug. The teammate just acts as though the user pasted the literal string [Pasted text #N].

Steps to Reproduce

  1. TeamCreate a team, then Agent a teammate into it with team_name and name set.
  2. Switch focus to the teammate's pane.
  3. Paste some text (the kind of paste that Claude Code would normally render as [Pasted text #N] in the prompt — e.g., multi-line or long content).
  4. Send the message.
  5. Teammate responds as if it only received the literal string [Pasted text #N], with no access to the actual pasted content.

Note: I'm reporting this based on what I observed — I have not yet isolated whether this happens on every paste to a teammate or only under certain conditions (length, content type, teammate state, etc.). Treat "sometimes vs. always" as unknown.

Claude Model

Opus 4.7

Is this a regression?

I don't know

Claude Code Version

2.1.112 (Claude Code)

Platform

Anthropic API

Operating System

macOS (Darwin 25.2.0)

Terminal/Shell

iTerm2 (inside tmux)

Additional Information

Possibly related (not a match, but same general area):

  • #49940 — Claude Code CLI paste input truncated for multi-line instructions over 1500 chars (about truncation on Windows, different symptom)

Since Claude Code teams on tmux route messages between the leader and teammate panes, this could be a tmux-specific routing issue where the paste buffer (held on the leader side under the [Pasted text #N] key) isn't being resolved before the teammate receives the user message. See also #49865 for a separate team-leader crash where toolUseContext appears to lose method references across the team boundary — possibly a similar marshaling issue.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗