Unclear What each of the four fields makes Claude Code do is not clear.
What
A hook is code that runs at a set moment. A PreToolUse hook runs before Claude uses a tool, which is an action such as editing a file or running a command, and it can block that action. A program that embeds Claude Code through the SDK (a software kit for building on Claude Code) can register these hooks with a matcher, the rule that decides which tool calls the hook handles. That matcher can now carry a whenUnanswered setting, defined by SDKHookCallbackMatcher. Before this release, a matcher's whenUnanswered was ignored.
whenUnansweredtakesafterSeconds,within,readsAlsoWithinandnoWritesWithin.- Invalid values are ignored, and the tool call is then refused when the hook's time limit runs out.
- The setting only applies when
onFailureis not"continue"and the process owns Claude Code's standard input, the channel it reads typed input from.
In the same change, the records Claude Code keeps about agents gained the fields takesNoHooks, inWorkflowRun, requireCanUseTool and runLimits.
Why
This changes how a tool call is settled when the host's permission hook never replies. Developers building on the SDK can now choose how long to wait and under what conditions. A badly formed setting does not fail open: the call is refused at the hook's time limit.
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.
> To check calls that run without your callback, such as file reads inside your [working directories](https://code.claude.com/docs/en/permissions.md#working-directories), use a [`PreToolUse` hook](https://code.claude.com/docs/en/agent-sdk/…agent-sdk/user-input see the edit
> * Outside Code Mode, the classifier reviews messages Claude sends to another agent with [`SendMessage`](https://code.claude.com/docs/en/tools-reference) before Claude Code delivers them. If an allow rule matches `SendMessage` or a `PreTo…permission-modes see the edit
What each of the four fields makes Claude Code do is not clear.
Anthropic's documentation has since written up PreToolUse, on Choose a permission mode.