{"version":"2.1.299","anchor":"hooks-module-retirement-now-throws-an-aggregate-error","canonical_anchor":"hooks-module-retirement-now-throws-an-aggregate-error","heading":"A hooks module that fails while unloading no longer stops the cleanup","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/hooks-module-retirement-now-throws-an-aggregate-error","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### A hooks module that fails while unloading no longer stops the cleanup\n\nWhen hooks modules unload, one module's failure no longer cuts the cleanup short; errors are gathered and reported together at the end\n\n**What**\n\nHooks are commands or code that run automatically at set points while Claude Code works, and a hooks module is a package that provides them. When hooks modules are unloaded, each one is told to shut down. Any errors thrown during that shutdown are now collected instead of interrupting the process. Once every module has been cleaned up, Claude Code raises one combined error with the message `a hooks module threw as it retired:`.\n\n**Why**\n\nA faulty hooks module can no longer stop the others from shutting down cleanly, and its failure is reported rather than lost.\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}