Hooks can now supply a .catch handler to recover instead of failing closed
When a hook (custom code that runs at specific points in Claude Code) throws an error or times out, the dispatch system now checks whether the hook supplied its own .catch handler. If it did, a new recovery path runs that handler and can use the answer it returns as the hook's final result, rather than simply failing. This is logged as "hook failed closed: ... (its .catch answered)" and reported through telemetry with a reason and a flag for whether the hook overran its time limit. A new "caught" outcome is now recorded for hooks handled this way.
This lets hook authors define custom recovery behavior for failures or timeouts instead of the hook simply failing closed, giving more control over how errors in custom hooks are handled.