Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.227 Home All releases olderv2.1.226 v2.1.228newer
Claude Code v2.1.227

Subagents can be locked to a fixed list of Bash commands

Use it now
Useful3 Signal3
Subagents Notable not in their notes

Workflow scripts can restrict a spawned agent's shell to a fixed list of allowed commands.

bashCommandClamp
What

Workflow scripts can pass agent(prompt, {bashCommandClamp: [...]}), a list of Bash(<command or prefix>) rules that the spawned agent's shell use is restricted to. Any Bash call not matching every clamp group is denied with "bashCommandClamp: no clamp rule matches this command", and a command whose structure cannot be taken apart (command substitution, control flow) is denied as unverifiable.

Details
  • The clamp becomes a permission layer of its own, merged into the tool permission context, on top of the usual allow and deny rules.
  • Malformed or inert clamp entries refuse the spawn outright rather than quietly running the agent unclamped.
  • None of this existed in 2.1.226.
Evidence

agent() opts.bashCommandClamp must be an array of non-empty strings

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.227 →