{"version":"2.1.334","anchor":"asyncrewake-hook-can-now-rewrite-status-2-to-1-on-userprompt","canonical_anchor":"asyncrewake-hook-can-now-rewrite-status-2-to-1-on-userprompt","heading":"Background prompt hooks that exit with code 2 may now be treated as code 1","tier":"notice","area":"Hooks","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/asyncrewake-hook-can-now-rewrite-status-2-to-1-on-userprompt","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### Background prompt hooks that exit with code 2 may now be treated as code 1\n\nIn some cases, an `asyncRewake` `UserPromptSubmit` hook that exits with code 2 now has its result changed to code 1\n\n**Unclear.** It is unclear how a result of code 1 is treated, so it is unclear whether the hook still blocks the prompt.\n\n**What**\n\nA hook is a script you set up to run at a set moment. `UserPromptSubmit` hooks run when a prompt is submitted. An `asyncRewake` hook runs in the background. Exit code 2 is the number a hook returns to block what is happening.\n\nWhen an `asyncRewake` hook on `UserPromptSubmit` exits with code 2, Claude Code now changes its result to code 1 in some cases, one of them tied to plugins. Before, the result was passed on unchanged.\n\n**Why**\n\nIn these cases, a background hook's blocking exit code on prompt submission is no longer treated as it was before.\n\n- Area: Hooks\n- Names: `UserPromptSubmit`, `asyncRewake`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}