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

Slash commands can restrict subcommands to bare invocations

Use it now
Useful2 Signal2
Slash Commands not in their notes

Custom commands can mark subcommands bare-only, so extra words go to the parent command.

subcommandsBareOnly
What

Command definitions gained a subcommandsBareOnly field. When it is set, a subcommand name only matches if nothing follows it, so typing /foo bar baz runs the parent /foo command with bar baz as its arguments instead of dispatching to the bar subcommand.

Details
  • Carried through both prompt-backed and file-backed command construction, and added to the allow-list used when commands are serialized.
  • Dispatch bails out on trailing text: if (e.subcommandsBareOnly && s !== "") return;.
  • The field did not exist in v2.1.226.
Evidence

if (e.subcommandsBareOnly && s !== "") return;, subcommandsBareOnly

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 →