claude-code - 💡(How to fix) Fix Agents cannot read pasted content in their session — arrives as unreadable placeholder

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When a user pastes text directly into an agent's session (via the agent panel), the agent receives a placeholder like [Pasted text #2 +12 lines] instead of the actual content. The agent has no way to retrieve or read the pasted text.

Root Cause

When a user pastes text directly into an agent's session (via the agent panel), the agent receives a placeholder like [Pasted text #2 +12 lines] instead of the actual content. The agent has no way to retrieve or read the pasted text.

Fix Action

Workaround

Route pasted content through the main session using SendMessage to the agent — this delivers it inline. Not obvious or discoverable.

RAW_BUFFERClick to expand / collapse

Summary

When a user pastes text directly into an agent's session (via the agent panel), the agent receives a placeholder like [Pasted text #2 +12 lines] instead of the actual content. The agent has no way to retrieve or read the pasted text.

Steps to reproduce

  1. Spawn a named subagent via the Agent tool
  2. Open the agent's panel in the Claude Code UI
  3. Paste multi-line text (e.g. log output, console text, a code snippet) into the agent's input and send
  4. Observe: the agent sees [Pasted text #N +M lines] and cannot access the content

Expected behavior

Pasted text is delivered to the agent as inline content, the same way it works in the main session.

Actual behavior

The agent receives an opaque placeholder. It cannot retrieve the content. The user typically has to re-enter the text, or route it through the main session via SendMessage.

Impact

This affects any workflow where a user pastes diagnostic output, logs, or other content directly to an agent. The agent-direct-addressing feature makes this more likely as users naturally try to share context with agents the same way they share it with the main session.

Workaround

Route pasted content through the main session using SendMessage to the agent — this delivers it inline. Not obvious or discoverable.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Pasted text is delivered to the agent as inline content, the same way it works in the main session.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING