{"version":"2.1.331","anchor":"plugin-runtime-sessioninfo-and-sessionredact-methods-ui","canonical_anchor":"plugin-runtime-sessioninfo-and-sessionredact-methods-ui","heading":"Plugins gain session.info and session.redact, and ui.log can carry a note for the agent","tier":"internal","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/plugin-runtime-sessioninfo-and-sessionredact-methods-ui","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Plugins gain session.info and session.redact, and ui.log can carry a note for the agent\n\nPlugins get `session.info` and `session.redact` methods, and `$.ui.log` takes an optional `agentNote` meant for the agent\n\n**Unclear.** It does not say what the two new requests do or whether any permission is needed to use them.\n\n**What**\n\nPlugins and mods are add-ons that run inside Claude Code. They call functions Claude Code provides to ask it to do things. This release changes that set of functions:\n\n- `session.info` and `session.redact` are now registered as methods plugins can call, and both are handled the \"append\" way. `session.redact` is new.\n\n- `$.ui.log`, the function a plugin uses to write a log line, takes a fourth argument. When it is given, it is stored on the log line as `agentNote`. Before, a log line held only the plugin's name and the text.\n\n**Why**\n\nA plugin can now attach a note meant for Claude to what it logs, and can call methods for session information and redaction, which means hiding parts of a session.\n\n- Area: Plugins\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}