{"version":"2.1.242","anchor":"prompts-pass-through-a-submit-hook-chain-that-can-rewrite-or","canonical_anchor":"prompts-pass-through-a-submit-hook-chain-that-can-rewrite-or","heading":"Prompts pass through a submit hook chain that can rewrite or drop them","tier":"use","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/prompts-pass-through-a-submit-hook-chain-that-can-rewrite-or","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Prompts pass through a submit hook chain that can rewrite or drop them\n\nHooks can now rewrite or drop your prompt before it is sent.\n\n**What**\n\nBefore a prompt is sent, it runs through two tiers of `prompt.submit` hooks, core ones and managed ones. A hook can drop the prompt, which shows a warning and runs no query, or rewrite it, which replaces the text in your message.\n\n**Details**\n\n- When a rewrite changes the text, @-mentions are recomputed: file, directory, MCP resource, agent and nested memory attachments are discarded and re-resolved with read state cleared.\n- Bash mode, slash commands and inputs that never query skip the chain, and settle with a fixed reason naming those cases.\n- A rewrite that cannot find the matching user message logs a warning saying the model will see the prompt as you typed it.\n\n**Evidence**\n\n`the prompt did not go through prompt.submit (a command, bash mode, an input that did not query, or a failed pass)`\n\n- Area: Hooks\n- Names: `prompt.submit`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5"}