Omniscio

OmniscioGuidesPermission rulesSubagents

Claude Code permissions: control which subagents run

A subagent starts with the Agent tool, and a permission rule can decide which agents Claude may start and whether one that asks for an expensive model or an isolated worktree needs your answer first.

Checked on November 27, 2026 against the Claude Code 2.1.332 documentation. By the Omniscio team. Updated .

The block

{
  "permissions": {
    "deny": ["Agent(Explore)"],
    "ask": [
      "Agent(model:opus)",
      "Agent(isolation:worktree)"
    ]
  }
}

One settings object, two lists. The deny list refuses one named subagent. The ask list prompts before a subagent call that asks for the Opus model tier or a git worktree. Paste the object beside whatever else the file holds; it is not a whole file to paste over.

The name is the one the agent was given: Explore and Plan for the built-in pair, and the name in a custom agent's frontmatter for your own. The same deny rule can be passed for one session with --disallowedTools "Agent(Explore)".

A bare "deny": ["Agent"] is a different rule. It removes the Agent tool from Claude's context, so no subagent of any kind can start. That is the setting for a session that should do all its work in the main conversation.

A parameter rule names one top-level field of the tool's input and the value to match. The first ask rule prompts when a subagent call sends the literal value opus. The second prompts when it asks for a git worktree. Move either rule to deny to refuse the call instead of asking.

Each rule names one parameter. To gate on both model and isolation, write both rules rather than combining them. A value supports *, so Agent(isolation:*) matches any explicit isolation value, and a parameter Claude omits is never matched.

What each rule matches

Agent rules, and the calls each one reaches.
RuleMatchesDoes not match
Agent(Explore)A call that starts the Explore subagentThe Plan subagent, or one of your own agents
AgentNo call at all: the tool is removed from context before Claude can use itNothing, while the rule is loaded
Agent(model:opus)A call whose input carries the literal value opusA call that sends a full model identifier, or no model at all
Agent(model:*)A call that sends any model valueA call that leaves the field unset
Agent(isolation:worktree)A call that asks for a git worktreeA call that asks for no isolation

The value is compared with the literal input Claude sends, before any normalization. That is why the alias opus matches and a full model ID for the same model does not. A field nested inside an object or an array cannot be matched, and a rule that tried to match the tool's main content field is ignored with a startup warning.

Why parameters are ask and deny only

A parameter rule works in the deny and ask lists. It does not work in the allow list, and the reason is in Anthropic's own wording: an allow rule for one parameter value would not establish that the call is safe overall.

That leaves two useful shapes. Ask before a call that names the expensive model, so you can decide for that request. Deny a call in a worktree when a session should stay in one checkout. A bare allow for the Agent tool is not the equivalent of either, and this page does not write one.

The rule decides whether the subagent starts.

Confirm it took effect

  1. Run /permissions and check that the Agent rules are listed, with the settings file that supplied each one.
  2. Ask Claude to explore the codebase. With Agent(Explore) denied, the call is refused.
  3. Ask for a subagent on Opus. With Agent(model:opus) in the ask list, a prompt appears.
  4. To see the value a call actually sends, run claude -p "Use a subagent on Opus to list the test files" --output-format stream-json --verbose and read the input of the tool_use block named Agent.

A misspelled tool name earns a startup warning; the subagent name inside the parentheses is not checked that way. claude doctor lists entries Claude Code rejected.

The mistakes that make an agent rule misfire

  • Denying the bare tool by accident. "deny": ["Agent"] stops every subagent, including the ones you wanted.
  • Writing the alias in an allow rule. Parameter matching is deny and ask only, so an allow rule for a model value does nothing.
  • Expecting a wildcard to cover an unset field. Agent(model:*) does not match a call that sends no model.
  • Using the label from the transcript. Rules and hook matchers take the tool's canonical name, not the label shown in the interface.

The other new pages

Each page carries a complete block, not a fragment. The hub lists all ten.

Where Omniscio fits

Omniscio is a desktop app for running several Claude Code agents side by side in one window. The rules on this page are Claude Code's own and apply inside an Omniscio session, because each session runs Claude Code.

Where these answers come from

Common questions

What is the difference between denying Agent and denying Agent(Explore)?

A bare Agent rule removes the Agent tool from Claude's context, so Claude cannot start any subagent. A scoped rule such as Agent(Explore) leaves the tool in place and blocks that one subagent, which lets the rest keep working.

Can I allow a subagent to run only on one model?

Not with a parameter rule. Parameter matching works in deny and ask rules only, because an allow rule for one parameter value would not establish that the call is safe. You can ask before a subagent runs on Opus, or deny it, but you cannot preapprove one model with Agent(model:opus).

Does Agent(model:*) match a subagent that sets no model?

No. A parameter the model omits is never matched, so a call that leaves model unset does not match Agent(model:*). The rule only sees a value Claude actually sends.

Why does Agent(model:opus) not match a full model ID?

The value is compared with the literal input Claude sends, before any normalization. The alias opus matches, while a full model identifier that means the same model does not. Read the tool_use input to see the literal value a call sends.