Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.334 ·

Background prompt hooks that exit with code 2 may now be treated as code 1

In some cases, an asyncRewake UserPromptSubmit hook that exits with code 2 now has its result changed to code 1

You'll notice Improvements
JSON All of v2.1.334
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.334,
ImprovementsSection of the release

Unclear It is unclear how a result of code 1 is treated, so it is unclear whether the hook still blocks the prompt.

What

A 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.

When 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.

Why

In these cases, a background hook's blocking exit code on prompt submission is no longer treated as it was before.

Read from
Names in the bundleUserPromptSubmitasyncRewake
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up UserPromptSubmit, on Intercept and control agent behavior with hooks. Claude Code runs each callback with a timeout, which you set in seconds with the `timeout` field on its `HookMatcher`. When you don't set one, Claude Code uses the event's default: 600 seconds for most events, 30 seconds for `UserPromptSub… agent-sdk/hooks see the edit
Added since A small documentation edit on Intercept and control agent behavior with hooks touched a line naming UserPromptSubmit after this was published. A `UserPromptSubmit` hook that spawns subagents can create infinite loops if those subagents trigger the same hook. You can prevent the loop in the following ways: agent-sdk/hooks see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is unclear how a result of code 1 is treated, so it is unclear whether the hook still blocks the prompt.
Anthropic's documentation agreesA small documentation edit on Intercept and control agent behavior with hooks touched a line naming UserPromptSubmit after this was…

See this entry in the whole of v2.1.334 →

Feedback