Hmbown/CodeWhale · error · anyhow::Error

Tool {name} could not enter the bounded child toolbox; use t

Error message

Tool {name} could not enter the bounded child toolbox; use tool_search with a narrower query

What it means

Capacity guard in the bounded child toolbox: activating the requested tool would not fit — the cache activation for that name did not admit it because the bounded toolbox is full. The message steers the model toward tool_search with a narrower query so fewer definitions compete for the bounded slots.

Source

Thrown at crates/tui/src/tools/subagent/mod.rs:13754

            &self.catalog,
            &mut self.active_names,
            &mut self.cache,
        )
        .map(|result| result.content)
        .map_err(|error| anyhow!(error))
    }

    fn hydrate(&mut self, name: &str) -> Result<String> {
        let activation = self.cache.activate(&self.catalog, &[name.to_string()]);
        remove_evicted_cache_activations(&self.catalog, &mut self.active_names, activation.evicted);
        self.active_names
            .extend(activation.admitted.iter().cloned());
        if activation.admitted.iter().any(|admitted| admitted == name) {
            return Ok(format!(
                "Tool `{name}` was deferred and has now been loaded. Retry the call with the newly available schema."
            ));
        }
        Err(anyhow!(
            "Tool {name} could not enter the bounded child toolbox; use tool_search with a narrower query"
        ))
    }
}

/// Role-only approval posture; the registry allow/deny and runtime envelope
/// remain the authoritative per-tool checks.
///
/// `Auto` is safe for every role. `Suggest` requires a write-capable role;
/// `Required` requires the full-shell posture. A Custom worker may describe
/// either posture, but its explicit allowlist and the runtime envelope still
/// narrow what it can execute. Read-only bash operations are classified Auto,
/// so Scouts and Reviewers do not gain general shell authority through this
/// branch.
fn role_posture_permits(agent_type: &FleetRole, approval: ApprovalRequirement) -> bool {
    if matches!(agent_type, FleetRole::Custom) {
        return true;
    }

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Use tool_search with a narrower query to load only the needed tool definitions
  2. Finish or drop unused tools so bounded toolbox slots free up
  3. Split the work across smaller tool usage per request
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/tools/subagent/mod.rs:13754 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/c94459be8ccd4389. Report an issue: GitHub.