What
- A new hookable event
session.sendwas added to the plugin event system, alongside the existingsession.receive,session.detach, andsession.end. It has its own schema (checkArgument,restoreArgument,check), is included in the events that can trigger the "hook ... is holding" warning if answered late, and runs through the same delivery pipeline as tool calls, trackingisDelivered/reasonwith a "the message was not delivered" failure message. - The plugin/SDK host API now exposes a
$.session.sendoperation that lets a plugin send text to a named target: a session ID, an agent ID, or an address object ({sessionId}or{agentId}). It requires non-emptytoandtextvalues.
Why This lets plugins and SDK integrations both react to and initiate messages being sent into a session, rather than only observing incoming ones.
Names in the bundlesession.send
Documented inclaude-code/agent-sdk/typescript-v2-preview
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.
Added since
A small documentation edit on Manage mods for your organization touched a line naming session.send after this was published.
| `$.session.send` | Sends a message that another session's, subagent's, or [teammate's](/docs/en/agent-teams) Claude reads |plugins/mods/admin see the edit
Confirmed since
Anthropic's documentation has since written up session.send, on Use the mods API.
`session.receive` and `session.send` let a mod observe the messages. Return `next(e)` from both to pass each message through unchanged:plugins/mods/api see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up session.send, on Use the mods API.