{"version":"2.1.259","anchor":"new-functionhooks-event-promptcontext","canonical_anchor":"new-functionhooks-event-promptcontext","heading":"New functionHooks event: prompt.context","tier":"use","area":"Plugin Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.259\/e\/new-functionhooks-event-promptcontext","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.259","markdown":"### New functionHooks event: prompt.context\n\nA new prompt.context hook event lets plugins add named context blocks to a prompt, capped at 32 blocks and 32000 characters.\n\nA new hook event, `prompt.context`, joins `prompt.section`, `ui.render`, and `tool.describe` in the SDK\/plugin hooks event registry. A hook can now contribute named context blocks to a prompt via `{blocks: [{name, text}]}`, subject to a validator that caps the count at 32 blocks, requires unique names, and enforces a combined 32000-character budget on top of what the engine itself adds. The event is fully wired through the event list, the site\/core hook dispatch tables, and new cache-invalidation hooks `invalidatePromptContext` and `invalidateHookedPromptContext`.\n\n- Area: Plugin Hooks\n- Names: `prompt.context`, `invalidatePromptContext`, `invalidateHookedPromptContext`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 4\/5"}