{"version":"2.1.280","anchor":"pluginsdk-host-api-new-sessionsend-operation","canonical_anchor":"new-plugin-hookable-event-sessionsend","heading":"New session.send hook event and plugin API for sending messages into a session","tier":"use","area":"Plugins","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280\/e\/pluginsdk-host-api-new-sessionsend-operation","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280","markdown":"### New session.send hook event and plugin API for sending messages into a session\n\nPlugins can now hook into and trigger sending a message into a session via the new session.send event and $.session.send API\n\n**What**\n\n- A new hookable event `session.send` was added to the plugin event system, alongside the existing `session.receive`, `session.detach`, and `session.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, tracking `isDelivered`\/`reason` with a \"the message was not delivered\" failure message.\n\n- The plugin\/SDK host API now exposes a `$.session.send` operation 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-empty `to` and `text` values.\n\n**Why** This lets plugins and SDK integrations both react to and initiate messages being sent into a session, rather than only observing incoming ones.\n\n- Area: Plugins\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5"}