You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the Claude Code provider setting "Disable provider subagents" switched on, every new Claude Code thread still receives the full Agent and ListAgents tool definitions plus the list of agent types. The setting's own description says it hides the tool ("Hide Claude Code's native Task tool so agents use bb for delegation"), but it only refuses the call after the model has tried it. I expected the tool text to be absent from the thread, so the model is not offered a tool it cannot use and the thread does not carry about 2,600 tokens of dead context. Sister report for Codex: #2706.
Versions and environment
bb 0.43.3, desktop app
macOS 26.5.2 (25F84)
Provider: Claude Code (built-in provider-claude-code), Claude Code CLI 2.1.278, bundled Agent SDK 0.3.245
Models: reproduced on claude-opus-5; the same tools are present in claude-fable-5-1 threads
Nothing unusual: local machine, thread in a project checkout environment
Steps to reproduce
bb plugin config provider-claude-code set subagentsDisabled true
Confirm: bb plugin config provider-claude-code prints subagentsDisabled = true (boolean) with the description "Hide Claude Code's native Task tool so agents use bb for delegation."
Start a new Claude Code thread (here: claude-opus-5, permission mode auto) with this prompt:
1. Print the exact names of every tool you were given up-front (not deferred ones), one per line.
2. Print the names of the agent types listed to you, one per line.
3. Call the Agent tool once with subagent_type "general-purpose", description "probe", prompt "Reply OK". Then quote the exact result or error text verbatim.
The reply lists Agent and ListAgents among the up-front tools and 9 agent types, and the Agent call is refused by a hook.
Not tried: toggling the setting off and on again, or a resumed thread.
Expected vs actual
Actual — reply of the probe thread, verbatim:
Up-front tools:
Agent
AskUserQuestion
Bash
Edit
ListAgents
Read
Skill
ToolSearch
Write
Agent types:
claude
codex:codex-rescue
Explore
feature-dev:code-architect
feature-dev:code-explorer
feature-dev:code-reviewer
general-purpose
Plan
statusline-setup
Result of the Agent call, verbatim:
<error>PreToolUse:Agent hook error: bb has disabled Claude Code native subagents; use bb delegation instead.</error>
Expected: with "Disable provider subagents" on, `Agent`, `ListAgents` and the agent-type list are not sent to the model at all, as the setting's description ("Hide … Task tool") says. Same expectation for "Disable Workflow tool" (not tested here).
Where it happens, read from the shipped bundle builtin-plugins/provider-claude-code/dist/ in bb 0.43.3 (no repo permalink — read from the installed app, not from source):
host.js: the place I found that acts on it is a PreToolUse hook — if (!threadSession.attachment.liveSettings.providerSubagentsEnabled && CLAUDE_PROVIDER_SUBAGENT_TOOL_NAMES.has(input.tool_name)) → permissionDecision: "deny" with the reason quoted above. CLAUDE_PROVIDER_SUBAGENT_TOOL_NAMES = new Set(["Agent", "Task"]).
The session params already accept and forward a disallowedTools array to the Agent SDK (...params.disallowedTools && params.disallowedTools.length > 0 ? { disallowedTools: [...] } : {}), but the setting does not appear to add the sub-agent tools to it.
Cost, how measured: first-request usage (input + cache write + cache read) of headless claude -p sessions, Claude Code 2.1.278, claude-opus-5. With Agent, ListAgents, ReportFindings and the claude.ai connector tools removed, the first request went from 22,113 to 16,418 tokens; the share of Agent + ListAgents + the agent-type list is about 2,600–2,950 tokens, split estimated from text lengths. For scale: a new Claude Code thread here starts at about 52,000 tokens.
What you ruled out
Not a stale setting: bb plugin config provider-claude-code shows subagentsDisabled = true, and the deny hook fires, so the thread does see the setting.
Not a Claude Code plugin adding the tool: Agent and ListAgents are Claude Code built-ins; only 4 of the 9 agent types come from plugins (feature-dev, codex).
Not fixable on the user side without collateral damage: the bare-name deny Agent in ~/.claude/settings.json does remove the tool text, but that file is shared with Claude Code outside bb, where native sub-agents are in daily use.
Every Claude Code thread of every user with this setting on: about 2,600–2,950 tokens per new thread plus a tool that is offered and then refused; no data or work lost; no safe workaround. Suggested fix (small): when the setting is on, add Agent, Task and ListAgents to the disallowedTools the provider already forwards, keep the deny hook as backstop; same for Workflow. Low priority, low effort. > AGENT GENERATED
Checks
I reproduced this on the latest release or on main, or I say above that I could not.
I searched open and closed issues for the same problem.
If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.
Summary
With the Claude Code provider setting "Disable provider subagents" switched on, every new Claude Code thread still receives the full
AgentandListAgentstool definitions plus the list of agent types. The setting's own description says it hides the tool ("Hide Claude Code's native Task tool so agents use bb for delegation"), but it only refuses the call after the model has tried it. I expected the tool text to be absent from the thread, so the model is not offered a tool it cannot use and the thread does not carry about 2,600 tokens of dead context. Sister report for Codex: #2706.Versions and environment
provider-claude-code), Claude Code CLI 2.1.278, bundled Agent SDK 0.3.245subagentsDisabled = true,workflowsDisabled = false,chromeEnabled = true,memoryEnabled = falseSteps to reproduce
bb plugin config provider-claude-code set subagentsDisabled truebb plugin config provider-claude-codeprintssubagentsDisabled = true (boolean)with the description "Hide Claude Code's native Task tool so agents use bb for delegation."AgentandListAgentsamong the up-front tools and 9 agent types, and the Agent call is refused by a hook.Not tried: toggling the setting off and on again, or a resumed thread.
Expected vs actual
Evidence
thr_7z2igtxtp8(archived), parentthr_68ufcgwe8z, projectproj_i8pc24h5c3, environmentenv_rye8dhknar.builtin-plugins/provider-claude-code/dist/in bb 0.43.3 (no repo permalink — read from the installed app, not from source):server.jsderiveProviderOptions:providerSubagentsEnabled: context.settings.subagentsDisabled !== truehost.js: the place I found that acts on it is aPreToolUsehook —if (!threadSession.attachment.liveSettings.providerSubagentsEnabled && CLAUDE_PROVIDER_SUBAGENT_TOOL_NAMES.has(input.tool_name))→permissionDecision: "deny"with the reason quoted above.CLAUDE_PROVIDER_SUBAGENT_TOOL_NAMES = new Set(["Agent", "Task"]).disallowedToolsarray to the Agent SDK (...params.disallowedTools && params.disallowedTools.length > 0 ? { disallowedTools: [...] } : {}), but the setting does not appear to add the sub-agent tools to it.usage(input + cache write + cache read) of headlessclaude -psessions, Claude Code 2.1.278, claude-opus-5. WithAgent,ListAgents,ReportFindingsand the claude.ai connector tools removed, the first request went from 22,113 to 16,418 tokens; the share ofAgent+ListAgents+ the agent-type list is about 2,600–2,950 tokens, split estimated from text lengths. For scale: a new Claude Code thread here starts at about 52,000 tokens.What you ruled out
bb plugin config provider-claude-codeshowssubagentsDisabled = true, and the deny hook fires, so the thread does see the setting.AgentandListAgentsare Claude Code built-ins; only 4 of the 9 agent types come from plugins (feature-dev, codex).Agentin~/.claude/settings.jsondoes remove the tool text, but that file is shared with Claude Code outside bb, where native sub-agents are in daily use.Suggested priority and effort (optional)
Every Claude Code thread of every user with this setting on: about 2,600–2,950 tokens per new thread plus a tool that is offered and then refused; no data or work lost; no safe workaround. Suggested fix (small): when the setting is on, add Agent, Task and ListAgents to the disallowedTools the provider already forwards, keep the deny hook as backstop; same for Workflow. Low priority, low effort. > AGENT GENERATED
Checks
main, or I say above that I could not.> AGENT GENERATEDand links the thread or report.