Hmbown/CodeWhale · error · anyhow::Error

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

Error message

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

What it means

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.

Source

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

        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
                .hydrate(name)
                .map(|content| RichToolResult::plain(ToolResult::success(content)));
        }
        if !request_active_names.contains(name) {
            return Err(anyhow!("Tool {name} is not active for this sub-agent"));
        }
        let result = self.execute_full(agent_id, tool_id, name, input).await;
        if deferred && result.is_ok() {
            touch_cached_tool_after_execution(
                &surface.catalog,
                &mut surface.active_names,
                &mut surface.cache,
                name,

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Pick a tool that survives this child's policy filter (read/search in read-only profiles)
  2. Change the agent's role or allowed_tools so the tool passes the filter
  3. Use a write-capable sibling agent for the mutating operation
Defensive patterns

Strategy: validation

When it happens

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