{"record":{"id":"3a1db28ecc62474c","repo":"Hmbown/CodeWhale","slug":"tool-name-is-not-in-this-child-s-policy-filtered","errorCode":null,"errorMessage":"Tool {name} is not in this child's policy-filtered catalog","messagePattern":"Tool (.+?) is not in this child's policy-filtered catalog","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/subagent/mod.rs","lineNumber":14917,"sourceCode":"        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\n                .hydrate(name)\n                .map(|content| RichToolResult::plain(ToolResult::success(content)));\n        }\n        if !request_active_names.contains(name) {\n            return Err(anyhow!(\"Tool {name} is not active for this sub-agent\"));\n        }\n        let result = self.execute_full(agent_id, tool_id, name, input).await;\n        if deferred && result.is_ok() {\n            touch_cached_tool_after_execution(\n                &surface.catalog,\n                &mut surface.active_names,\n                &mut surface.cache,\n                name,","sourceCodeStart":14899,"sourceCodeEnd":14935,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tools/subagent/mod.rs#L14899-L14935","documentation":"Catalog-miss guard in execute_from_surface: the requested tool name was not found iterating the child's policy-filtered catalog. Policy filtering removed the tool (role, capability, or network posture), so although the model asked for it by name, no definition exists in this child's surface.","triggerScenarios":"Thrown at crates/tui/src/tools/subagent/mod.rs:14917 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pick a tool that survives this child's policy filter (read/search in read-only profiles)","Change the agent's role or allowed_tools so the tool passes the filter","Use a write-capable sibling agent for the mutating operation"],"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-14T05:17:10.506Z"}