Task(AgentName) disable — runtime test
Hands-on runtime battle-test of Task(AgentName) disable. Result: PASS.
Task(AgentName) Disable
Disabling specific agents through Task(AgentName) syntax blocks selected subagent types at availability time, filtering them from Claude's agent option set without throwing errors.
How it works
The --disallowedTools CLI flag and settings.json permissions support both broad and granular blocking:
Taskalone blocks all subagents entirely.Task(Explore)blocks only Explore-type agents; the Task tool remains available and other agent types (Plan, Bash, general-purpose) continue available.
Disabling works at the availability level: blocked agents do not appear in the set of agent types Claude can select from, so they never become invocation candidates.
What the test found
Three scenarios were verified on 2026-01-07:
- Blocking all subagents (
Task) removed the tool entirely. Pass. - Blocking a single agent type (
Task(Explore)) filtered only that agent, leaving Task and other types functional. Pass. - When requesting a disabled agent, Claude did not error. Instead it worked around the constraint by selecting alternative agents or direct tools, demonstrating graceful degradation.
The syntax scales: Task(Plan) would block Plan agents without affecting others, though Plan was not explicitly tested.
Why it matters
This gives three concrete capabilities:
- Cost control: Disable expensive agents (Opus-based types) to constrain spending.
- Security: Prevent specific agent capabilities where policy forbids them.
- Testing: Isolate agent behaviors by removing interference from other types.
The graceful fallback means requests never fail catastrophically; Claude adapts rather than stopping.
Mechanics
The availability filter operates before agent selection. Claude's agent-type decision tree sees a reduced set of options based on the disallowedTools configuration. This differs from a hard runtime block and explains why no errors surface.
Test Results: Task(AgentName) Disable Syntax
Feature: Added support for disabling specific agents using Task(AgentName) syntax in settings.json permissions or the --disallowedTools CLI flag
Tested: 2026-01-07
Test Results
Test 1: Disable Task entirely
--disallowedTools "Task"
Result: PASS - Task tool completely removed from available tools
Test 2: Disable specific agent type
--disallowedTools "Task(Explore)"
Result: PASS - Explore removed from available subagent types
- Task tool still available
- Other agent types (Bash, general-purpose, Plan, etc.) still available
- Explore specifically filtered out
Test 3: Behavior when requesting disabled agent
Result: Claude uses alternative approaches
- If Explore is disabled, Claude may use other agents or direct tools
- No hard error thrown - graceful degradation
Key Findings
Granular control works:
Task- blocks all subagentsTask(Explore)- blocks only Explore agentTask(Plan)- would block only Plan agent (not tested)
Filtering is at availability level:
- Disabled agents don't appear in the agent type list
- Claude sees a reduced set of options
Graceful degradation:
- Claude works around disabled agents by using alternatives
- No errors thrown when asking for disabled agent
Use Cases
- Cost control: Disable expensive agents (Opus-based)
- Security: Prevent certain agent capabilities
- Testing: Isolate specific agent behaviors
Status: PASS
Feature works as documented. Granular agent disabling confirmed.
test_d2691b6e4bc5a298d4452009ed255199b87705613b1e2fd064d57fa75a6b679d2856ceafad6b1daa8f982493871b6ddfd25b051307c2cb283061912dc64ce8651c0d857060b9d65cc3948983f0a4ce1446563cc294110f4c5c9cde04503cd938378fa144779cdf099158c53a13b9107Signed with an ed25519 key held off the repo. Anyone can verify against the published public key; nobody without the secret key can forge it. Click verify: it recomputes the signature in your browser. The signature proves integrity and authorship of this exact content — not a third-party timestamp or that the underlying claim is objectively true. signedAt is when the @f3/attest pipeline ran, not when the work happened; the evidence refs carry the source dates.
- verifies Task(AgentName) disable Primitive