{"version":"2.1.333","anchor":"plugin-runtime-api-sessionwaituntil-sessionload-session","canonical_anchor":"plugin-runtime-api-sessionwaituntil-sessionload-session","heading":"Plugin runtime API gains session, turn, prompt and feedback methods","tier":"internal","area":"Plugin API","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/plugin-runtime-api-sessionwaituntil-sessionload-session","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Plugin runtime API gains session, turn, prompt and feedback methods\n\nPlugins and mods get new methods such as session.waitUntil, session.awake, turn.background and feedback.review, plus new prompt.submit options\n\n**What**\n\nPlugins and mods are add-ons that run inside Claude Code. They call named methods to ask Claude Code to do things. This release adds several methods and options to that list.\n\n- `$.session.waitUntil`, `$.session.load` and `$.session.authorize` are available to plugins.\n\n- `session.messages` can look up messages by id or by name.\n\n- `session.awake` and `turn.background` are new method names.\n\n- `feedback.review`, `feedback.draft` and `feedback.discard` are new method names.\n\n- `$.prompt.submit` accepts `wait` and `consent` options. A wrong value is rejected with messages such as \"takes { wait } as a boolean\".\n\n- `ui.render` accepts an `escapeAction` of close or cancel.\n\n- MCP tools served by mods can register tool traits. MCP is the standard way to connect outside tools to Claude Code.\n\n- An `isOrganizations` plugin tier is added.\n\nPrograms that drive Claude Code through the SDK also see some changes. The toast message and the prompt-suggestion message each gain an optional `written_at` field. The headless stream, Claude Code's output when it runs without its usual screen, no longer sends system messages with subtype `ui_audio`.\n\n**Why**\n\nPlugin and mod authors have more control over sessions, turns, prompt submission and feedback. Anyone reading the SDK stream should expect the new `written_at` field and no `ui_audio` messages.\n\n- Area: Plugin API\n- Tier: Under the hood\n- Useful: 4\/5\n- Signal: 4\/5\n- Scope: individual\n- Heads-up: no"}