{"version":"2.1.327","anchor":"waiting-shell-option-for-posttooluse-hooks","canonical_anchor":"waiting-shell-option-for-posttooluse-hooks","heading":"After-tool hooks can reuse a shell that is already waiting","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/waiting-shell-option-for-posttooluse-hooks","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### After-tool hooks can reuse a shell that is already waiting\n\n`PostToolUse` and `PostToolUseFailure` hooks can now run in an already waiting shell instead of always starting a new process\n\n**What**\n\nHooks are your own scripts that Claude Code runs at set moments. `PostToolUse` hooks run after a tool call succeeds, and `PostToolUseFailure` hooks run after one fails. A tool call is one action Claude takes, such as running a command or editing a file.\n\nThese hooks used to start a new process every time. They can now reuse a shell that is already running and waiting, when Claude Code allows it for that call. The text a hook prints is now also kept as a lasting record in the session.\n\n**Why**\n\nStarting a fresh process for every hook takes time. Reusing a waiting shell cuts how long these hooks take to run.\n\n- Area: Hooks\n- Names: `PostToolUse`, `PostToolUseFailure`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}