{"version":"2.1.227","anchor":"spawned-agents-can-be-clamped-to-a-fixed-set-of-shell-comman","canonical_anchor":"spawned-agents-can-be-clamped-to-a-fixed-set-of-shell-comman","heading":"Spawned agents can be clamped to a fixed set of shell commands","tier":"use","area":"Subagents","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/spawned-agents-can-be-clamped-to-a-fixed-set-of-shell-comman","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Spawned agents can be clamped to a fixed set of shell commands\n\nSpawning an agent with a bad command clamp list now fails immediately instead of running unclamped.\n\n**What**\n\nThe `agent()` spawn API gained a `bashCommandClamp` option: a list of `Bash(...)` permission rules that limits which shell commands the spawned agent may run. It is checked strictly at spawn time, so a malformed list, an entry that does not parse as a Bash rule, or one with empty or space-padded contents aborts the spawn instead of quietly running the agent with no clamp.\n\n**Details**\n\n- Entries take the form `Bash(<command or prefix>)`, matching the usual permission rule syntax.\n- Rejection message when the option is not a list of non-empty strings: `agent() opts.bashCommandClamp must be an array of non-empty strings; got `.\n- The option is now part of the serialized list of spawn options, alongside `disallowedTools`.\n\n**Usage**\n\n`agent(\"audit the build\", { bashCommandClamp: [\"Bash(npm test)\", \"Bash(git log:*)\"] })` **Evidence** `agent() opts.bashCommandClamp must be an array of non-empty strings; got `\n\n- Area: Subagents\n- Names: `bashCommandClamp`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5"}