{"version":"2.1.333","anchor":"hook-permission-decisions-carry-a-reason-code-written-at-ad","canonical_anchor":"hook-permission-decisions-carry-a-reason-code-written-at-ad","heading":"PreToolUse hooks can pass a reason code with their permission decision","tier":"use","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/hook-permission-decisions-carry-a-reason-code-written-at-ad","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### PreToolUse hooks can pass a reason code with their permission decision\n\nA PreToolUse hook's permissionDecisionReasonCode is now kept in the result, and some events gain an optional written_at time\n\n**What**\n\nA hook is a command you configure to run when something happens in Claude Code. A `PreToolUse` hook runs before a tool is used and can block it. Changes:\n\n- `permissionDecisionReasonCode` from a `PreToolUse` hook is now copied into the result Claude Code records.\n\n- Two kinds of event gained an optional `written_at` field.\n\n- A new attachment type, `projects_instructions`, was added.\n\n**Why**\n\nPrograms built on Claude Code with the SDK, and programs that handle hooks, get more detail about permission decisions and events.\n\n- Area: Hooks\n- Names: `PreToolUse`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}