Hmbown/CodeWhale · error · anyhow::Error
Tool {name} is not active for this sub-agent
Error message
Tool {name} is not active for this sub-agent What it means
Activation guard in execute_from_surface: the tool exists in the catalog and is not deferred, but its name is absent from request_active_names — the per-request activated set. The child uses bounded tool activation, so a catalog tool that was never activated (or was evicted) cannot execute directly.
Source
Thrown at crates/tui/src/tools/subagent/mod.rs:14927
}
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,
);
}
result
}
}
fn is_unbounded_shell_run(name: &str, input: &Value) -> bool {
canonical_action_alias(name, input) == "exec_shell"
}
View on GitHub (pinned to 0c42157ee5)
Solutions
- Activate the tool first via tool_search/hydration in the same request
- Narrow the active tool set so the needed tool is not evicted
- Retry the call after successful activation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tools/subagent/mod.rs:14927 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/9e472b73f8e6f204.
Report an issue: GitHub.