Claude Code 2.1.304: mods can require a person to approve a tool call
In the new version of Claude Code, Anthropic’s coding agent, a mod can leave approval of a tool call to a person. If nobody can be asked, the call is refused. The transcript now also records when another plugin skips one of a mod’s hooks.
Anthropic released version 2.1.304 of Claude Code, its coding agent, on 19 October. The new version lets a mod specify that only a person can approve a particular tool call.
Mods are extensions to Claude Code. They can add their own tools, commands and hooks to the agent, for example. A hook is code that runs when a particular event occurs. In the tool.check event, a mod inspects a tool call and can respond that the call requires permission.
A mod can now add decider: "person" to that response. Permission can then be granted only through the permission dialog or through a callback from the host application running Claude Code. No other automatic approval is enough. If nobody can be asked when the call is made, the call is refused and the mod’s own reason is shown. The call is therefore never carried out without approval.
The tool.check event also has a new field, e.isReadOnly. Claude Code sets the field when a tool call only reads data.
The new version also makes it easier to debug a mod’s own checks. When a plugin that runs first skips one of a mod’s hooks, Claude Code adds a line to the transcript, the session’s event log. The line names both the event and the plugin that skipped the hook.
Mods’ settings.read hooks now receive each settings layer separately and can rewrite the merged settings. This lets a mod managed by an organisation turn an organisation setting into a ceiling that the user cannot exceed, Anthropic said. The same applies to the cleanupPeriodDays setting, which determines when old session data is deleted. Anthropic also fixed a bug in which a failed mod reload made the tools and commands of the version still in use disappear.
The version contains dozens of other fixes. Those that concern risky situations include these:
- claude --worktree no longer removes the worktree and its branch without asking when a session ends and HEAD is detached or on another branch. The bug could lose commits, the company said.
- Claude Code now asks for confirmation of an rm -r command even when the target is a mounted drive or its parent folder, such as /Volumes, /media or /mnt/c in WSL.
- The reason a PreToolUse hook gives for a denial no longer turns into a timeout error if an Agent SDK hook for the same tool call exceeds its time limit.
Anthropic also limited skills’ hooks. During a session, the skills from a single source can register at most 1,024 hooks, with matchers totalling no more than 16,384 characters. A source can be a repository, the user’s own folder or a plugin.
This report is based on the release notes that Anthropic published on GitHub. The same list also appears in the company’s changelog.