Group of 2 Under the hood
User messages, including ones relayed through the remote bridge, can now carry pasted text as a distinct pasted_content field
What
- User-message schemas, including the SDK's user-message-replay type, gain a
pasted_contentfield: content the user pasted rather than typed, appended after the typed text (optionally wrapped in<pasted_content>tags). Image or document blocks still must go inmessage.content, not here. The internal user-turn extraction path now plumbspastedContentthrough as well. - Inbound messages relayed through the remote-control bridge (excluding peer and slack-ping messages) now go through the same pasted-content merge used by the SDK, appending any attached pasted text blocks to the message body and emitting the existing
sdk_pasted_contenttelemetry.
Why
Keeping pasted text separate from typed text lets Claude Code and the SDK tell the two apart, and extending this to bridge-relayed messages means the same distinction now applies consistently no matter how a message arrives.
Names in the bundlepasted_content
Documented inclaude-code/agent-sdk/typescript
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up pasted_content, on Agent SDK reference - TypeScript.
pasted_content?: MessageParam["content"][];agent-sdk/typescript see the edit
Added since
A small documentation edit on Hooks reference touched a line naming pasted_content after this was published.
In addition to the [common input fields](#common-input-fields), UserPromptSubmit hooks receive the `prompt` field containing the text the user submitted. Pasted content that collapsed to a `[Pasted text #N]` placeholder arrives expanded in…hooks see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
A small documentation edit on Hooks reference touched a line naming pasted_content after this was published.