Hooks That Rewrite Tool Inputs and Answer Permission Prompts
3.4.0This release adds hooks that rewrite a tool call's inputs before it runs or answer its permission prompt, so a script can apply your team's rules to every tool call in V3 sessions instead of waiting on you to approve each one. It also offers four /memories choices, resumes and lists cloud sessions in more places, and fixes headless, context window, MCP, search, /tangent, /rewind, and display issues.
In a V3 session, a PreToolUse hook can now return updatedInput to replace a tool call's inputs before the tool runs, alongside its allow, ask, or deny decision. A new PermissionRequest hook runs when a tool call would ask you for permission and can answer with allow or deny, so a script grants or refuses a call that would otherwise wait on you. A deny from any hook wins over an allow, and a hook's permission answer applies to that one tool call only. Learn more ->