{"version":"2.1.331","anchor":"sessionredact-plugin-function-added","canonical_anchor":"sessionredact-plugin-function-added","heading":"Plugin function session.redact takes a text string and limits its length","tier":"internal","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/sessionredact-plugin-function-added","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Plugin function `session.redact` takes a text string and limits its length\n\nThe `session.redact` function available to plugins now takes a text string, enforces a maximum length and runs a redaction routine\n\n**Unclear.** It is not clear what the redaction removes or whether plugins that use this function can run for everyone.\n\n**What**\n\nPlugins are add-ons that extend Claude Code, and they can call functions that Claude Code provides. The `session.redact` function now takes a piece of text as a string, refuses text over a maximum length, and runs it through a redaction routine that removes sensitive content.\n\n**Why**\n\nPlugin authors can have Claude Code redact text for them rather than doing it themselves.\n\n- Area: Plugins\n- Names: `session.redact`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}