{"record":{"id":"50850122cd12f8ac","repo":"Hmbown/CodeWhale","slug":"tool-name-is-not-in-this-child-s-catalog","errorCode":null,"errorMessage":"Tool {name} is not in this child's catalog","messagePattern":"Tool (.+?) is not in this child's catalog","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/subagent/mod.rs","lineNumber":14904,"sourceCode":"    #[cfg(test)]\n    async fn execute(&self, agent_id: &str, name: &str, input: Value) -> Result<String> {\n        self.execute_full(agent_id, \"\", name, input)\n            .await\n            .map(|result| result.result.content)\n    }\n\n    async fn execute_from_surface(\n        &self,\n        agent_id: &str,\n        tool_id: &str,\n        surface: &mut SubAgentToolSurface,\n        request_active_names: &std::collections::HashSet<String>,\n        name: &str,\n        input: Value,\n    ) -> Result<RichToolResult> {\n        if is_tool_search_tool(name) {\n            if !request_active_names.contains(name) {\n                return Err(anyhow!(\"Tool {name} is not in this child's catalog\"));\n            }\n            return surface\n                .search(name, &input)\n                .map(|content| RichToolResult::plain(ToolResult::success(content)));\n        }\n\n        let Some(deferred) = surface\n            .catalog\n            .iter()\n            .find(|tool| tool.name == name)\n            .map(|tool| tool.defer_loading.unwrap_or(false))\n        else {\n            return Err(anyhow!(\n                \"Tool {name} is not in this child's policy-filtered catalog\"\n            ));\n        };\n        if deferred && !request_active_names.contains(name) {\n            return surface","sourceCodeStart":14886,"sourceCodeEnd":14922,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tools/subagent/mod.rs#L14886-L14922","documentation":"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.","triggerScenarios":"Thrown at crates/tui/src/tools/subagent/mod.rs:14904 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List the child's available tools (tool_search) and use one of those names","Fix the tool name typo or outdated alias","Re-spawn the agent with the tool in its allowed_tools if it should have it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}