Hmbown/CodeWhale · error · anyhow::Error

Tool {name} is not in this child's catalog

Error message

Tool {name} is not in this child's catalog

What it means

Catalog guard in execute_from_surface: a tool_search-surface request asked for a tool name that is not in request_active_names and not found in the child's tool catalog. The catalog is per-child (allocated in child_runtime), so a name valid for the parent may simply not exist for this agent.

Source

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

    #[cfg(test)]
    async fn execute(&self, agent_id: &str, name: &str, input: Value) -> Result<String> {
        self.execute_full(agent_id, "", name, input)
            .await
            .map(|result| result.result.content)
    }

    async fn execute_from_surface(
        &self,
        agent_id: &str,
        tool_id: &str,
        surface: &mut SubAgentToolSurface,
        request_active_names: &std::collections::HashSet<String>,
        name: &str,
        input: Value,
    ) -> Result<RichToolResult> {
        if is_tool_search_tool(name) {
            if !request_active_names.contains(name) {
                return Err(anyhow!("Tool {name} is not in this child's catalog"));
            }
            return surface
                .search(name, &input)
                .map(|content| RichToolResult::plain(ToolResult::success(content)));
        }

        let Some(deferred) = surface
            .catalog
            .iter()
            .find(|tool| tool.name == name)
            .map(|tool| tool.defer_loading.unwrap_or(false))
        else {
            return Err(anyhow!(
                "Tool {name} is not in this child's policy-filtered catalog"
            ));
        };
        if deferred && !request_active_names.contains(name) {
            return surface

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. List the child's available tools (tool_search) and use one of those names
  2. Fix the tool name typo or outdated alias
  3. Re-spawn the agent with the tool in its allowed_tools if it should have it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/tools/subagent/mod.rs:14904 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/50850122cd12f8ac. Report an issue: GitHub.