Repository navigation
Description
Summary
When Disable provider subagents is enabled for Codex, bb correctly prevents native child creation, but the running agent still receives the native spawn_agent collaboration tool and instructions describing a one-thread concurrency limit. Skills that require subagents therefore invoke a tool that can only fail with agent thread limit reached, then may incorrectly report that delegation is unavailable even though bb thread spawn --parent-self works.
The disabled policy should make the agent contract self-consistent: either withhold the unusable native tool, or explicitly route delegation instructions and skills to bb-native child threads.
Versions and environment
- bb 0.40.0, official npm release (
source: npm,isDevelopment: false,~/.bbdata directory) - macOS 26.4.1, arm64
- Node.js v23.11.1
- Codex CLI 0.151.0, provider
codex Disable provider subagentsenabled for Codex- Working locally in an unmanaged/direct environment; bb Connect disconnected
Steps to reproduce
- Enable Settings → Codex → Disable provider subagents.
- Start a Codex thread.
- Ask Codex to run a skill that requires subagents or ask to launch a subagent.
- Agent gets confused after calling
spawn_agentwhich fails withcollab spawn failed: agent thread limit reached. - Agent claims that launching subagents is blocked in this session (partially true).
bb thread spawnworks as expected.
Expected vs actual
Expected:
- With native Codex subagents disabled, the native spawn_agent tool should be absent or
clearly unavailable to the agent.
- The agent should not conclude that all delegation is unavailable.
Actual:
- spawn_agent remains in the agent's tool contract.
- The prompt reports one concurrency slot, including the root agent.
- Every native spawn attempt fails with:
collab spawn failed: agent thread limit reached
- bb thread spawn --parent-self succeeds in the same session.
Evidence
Live state immediately before the failed native spawn:
bb thread show <root-thread-id> --json
thread.canSpawnChild: true
thread.activeBackgroundAgentCount: 0
parentThreadId: null
collaboration agent list
/root: running
(no child agents)
The successful bb-native control created a child under the current root thread, received BB_THREAD_SPAWN_OK, and reached idle. The worktree remained unchanged.
The current setting explicitly says native subagents are disabled so agents use bb delegation:
plugins/provider-codex/server.tsat9c170fdb- The setting resolves to
providerSubagentsEnabled: falsein the same file at lines 69–73. - bb then disables Codex multi-agent and caps the session at one thread in
session-params.tslines 623–627.
PR #611 confirms that the exact agent thread limit reached result is the intended enforcement mechanism. This issue is not asking to remove that enforcement; it is about the remaining tool/instruction contract telling agents to use an impossible path instead of bb delegation.
No matching open or closed issue was found for the native tool remaining advertised under this setting. Related but distinct: #509 requested the disable control itself and was closed by #611.
What you ruled out
- Not specific to adopted sessions: the user reproduced the same native error in a fresh Codex session.
- Not a general inability to create child threads:
bb thread spawn --parent-selfsucceeded immediately in the same environment. - Not a user Codex thread-limit override: no agent thread cap is set in the user's Codex config.
- Not an accidental enforcement regression: PR Add provider controls for native agent tools #611 deliberately verifies the exact native failure.
- Not the local bb source checkout: reproduction used official bb 0.40.0 (
source: npm, non-development); the checkout was read only for source tracing.
Suggested priority and effort (optional)
Medium — no data loss and bb-native delegation is a viable workaround, but agents and subagent-dependent skills select the advertised dead path and can produce weaker work or false capability reports. Likely Low–Medium depending on whether dynamic tool filtering is available at session construction.
AGENT GENERATED
Activity
bb-slop-cop commentedon Aug 29, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-codex,partial-repropartial-repro