{"record":{"id":"c94459be8ccd4389","repo":"Hmbown/CodeWhale","slug":"tool-name-could-not-enter-the-bounded-child-tool","errorCode":null,"errorMessage":"Tool {name} could not enter the bounded child toolbox; use tool_search with a narrower query","messagePattern":"Tool (.+?) could not enter the bounded child toolbox; use tool_search with a narrower query","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/subagent/mod.rs","lineNumber":13754,"sourceCode":"            &self.catalog,\n            &mut self.active_names,\n            &mut self.cache,\n        )\n        .map(|result| result.content)\n        .map_err(|error| anyhow!(error))\n    }\n\n    fn hydrate(&mut self, name: &str) -> Result<String> {\n        let activation = self.cache.activate(&self.catalog, &[name.to_string()]);\n        remove_evicted_cache_activations(&self.catalog, &mut self.active_names, activation.evicted);\n        self.active_names\n            .extend(activation.admitted.iter().cloned());\n        if activation.admitted.iter().any(|admitted| admitted == name) {\n            return Ok(format!(\n                \"Tool `{name}` was deferred and has now been loaded. Retry the call with the newly available schema.\"\n            ));\n        }\n        Err(anyhow!(\n            \"Tool {name} could not enter the bounded child toolbox; use tool_search with a narrower query\"\n        ))\n    }\n}\n\n/// Role-only approval posture; the registry allow/deny and runtime envelope\n/// remain the authoritative per-tool checks.\n///\n/// `Auto` is safe for every role. `Suggest` requires a write-capable role;\n/// `Required` requires the full-shell posture. A Custom worker may describe\n/// either posture, but its explicit allowlist and the runtime envelope still\n/// narrow what it can execute. Read-only bash operations are classified Auto,\n/// so Scouts and Reviewers do not gain general shell authority through this\n/// branch.\nfn role_posture_permits(agent_type: &FleetRole, approval: ApprovalRequirement) -> bool {\n    if matches!(agent_type, FleetRole::Custom) {\n        return true;\n    }","sourceCodeStart":13736,"sourceCodeEnd":13772,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tools/subagent/mod.rs#L13736-L13772","documentation":"Capacity guard in the bounded child toolbox: activating the requested tool would not fit — the cache activation for that name did not admit it because the bounded toolbox is full. The message steers the model toward tool_search with a narrower query so fewer definitions compete for the bounded slots.","triggerScenarios":"Thrown at crates/tui/src/tools/subagent/mod.rs:13754 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use tool_search with a narrower query to load only the needed tool definitions","Finish or drop unused tools so bounded toolbox slots free up","Split the work across smaller tool usage per request"],"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"}