{"version":"2.1.311","anchor":"hooks-runtime-can-skip-dispatch-when-all-handlers-are-defaul","canonical_anchor":"hooks-runtime-can-skip-dispatch-when-all-handlers-are-defaul","heading":"Hooks runtime skips needless work, with two variables to turn this off","tier":"use","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/hooks-runtime-can-skip-dispatch-when-all-handlers-are-defaul","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### Hooks runtime skips needless work, with two variables to turn this off\n\nThe hooks runtime now skips work when only default handlers apply; two environment variables switch the shortcuts off\n\n**What**\n\nThe runtime that handles hooks and plugins now takes shortcuts. Hooks are your own commands that run when certain events happen. The shortcuts are:\n\n- skipping the usual handling when every matching handler is a default one\n\n- answering `command.describe` and `env.get` events directly when they arrive alone\n\n- loading fewer modules for `session.append` and `prompt.attachment` events\n\nThe shortcuts are on by default. Two environment variables turn them off:\n\n- `CLAUDE_CODE_DISABLE_EMPTY_CLASSIC_DISPATCH_SKIP`\n\n- `CLAUDE_CODE_DISABLE_LONE_SEC_DEFAULT_SHORTCUT`\n\n**Why**\n\nThese shortcuts are there to save work. If hooks or plugins start behaving differently, setting these variables brings back the earlier handling.\n\n- Area: Hooks\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}