{"version":"2.1.314","anchor":"project-docs-pretooluse-hook-now-vets-project-doc-reads","canonical_anchor":"project-docs-pretooluse-hook-now-vets-project-doc-reads","heading":"PreToolUse hooks can now stop project documents from reaching Claude","tier":"notice","area":"Hooks","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.314\/e\/project-docs-pretooluse-hook-now-vets-project-doc-reads","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.314","markdown":"### PreToolUse hooks can now stop project documents from reaching Claude\n\nEach project document is checked with your PreToolUse hooks, and if a hook blocks, fails or rewrites, none of its text is sent\n\n**Unclear.** It is not clear whether this check applies in every mode or only in certain kinds of session.\n\n**What**\n\nA hook is a command you configure that Claude Code runs at a set moment. A `PreToolUse` hook runs before a tool is used and can block it. Claude Code now runs your `PreToolUse` hooks for each project document it is about to read into the conversation.\n\n- If a hook fails with an error, no text from that document is sent.\n\n- If a hook blocks the read, no text is sent.\n\n- If a hook rewrites the request, no text is sent.\n\nIn each case Claude Code logs an error. Project documents are also no longer read once Claude has already replied in the conversation.\n\nWhen the conversation is compacted (shortened to save space), Claude Code now asks the hooks about the project documents before it fetches any of them, and can refuse a read that a hook vetoed or whose document name does not match what was checked.\n\n**Why**\n\nHooks can now keep project document content out of the conversation, which gives you a way to control what gets sent to the model.\n\n- Area: Hooks\n- Names: `PreToolUse`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}