{"record":{"id":"08d0bc7fb5df593b","repo":"Hmbown/CodeWhale","slug":"tool-name-cannot-prove-a-bounded-file-target-an","errorCode":null,"errorMessage":"Tool {name} cannot prove a bounded file target, and another child is writing in this shared checkout. Use scope-aware file tools, or launch the children with worktree isolation.","messagePattern":"Tool (.+?) cannot prove a bounded file target, and another child is writing in this shared checkout\\. Use scope-aware file tools, or launch the children with worktree isolation\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/subagent/mod.rs","lineNumber":14870,"sourceCode":"                                        capability,\n                                        ToolCapability::WritesFiles\n                                            | ToolCapability::ExecutesCode\n                                            | ToolCapability::Network\n                                    )\n                                })))\n                }))\n        {\n            let manager = self.coordination_manager.read().await;\n            // Only a *contended* shared checkout needs this gate. The claim\n            // exists so concurrent children cannot overwrite each other; a lone\n            // writer has no peer to collide with, and blocking it there bought\n            // no safety while making a builder unable to run ordinary shell\n            // work in the workspace the operator actually watches — worktree\n            // isolation \"fixes\" that by writing somewhere they never see.\n            if manager.shared_write_claim(&self.owner_agent_id).is_some()\n                && manager.has_peer_shared_write_claim(&self.owner_agent_id)\n            {\n                return Err(anyhow!(\n                    \"Tool {name} cannot prove a bounded file target, and another child is writing in this shared checkout. Use scope-aware file tools, or launch the children with worktree isolation.\"\n                ));\n            }\n        }\n        let context = self\n            .registry\n            .context()\n            .clone()\n            .with_owner_agent(self.owner_agent_id.clone(), self.owner_agent_name.clone());\n        self.registry\n            .execute_rich_full_with_context(name, input, Some(&context))\n            .await\n            .map_err(|e| anyhow!(e))\n    }\n\n    #[cfg(test)]\n    async fn execute(&self, agent_id: &str, name: &str, input: Value) -> Result<String> {\n        self.execute_full(agent_id, \"\", name, input)","sourceCodeStart":14852,"sourceCodeEnd":14888,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tools/subagent/mod.rs#L14852-L14888","documentation":"Error \"Tool {name} cannot prove a bounded file target, and another child is writing in this shared checkout. Use scope-aware file tools, or launch the children with worktree isolation.\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/tools/subagent/mod.rs:14870 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use scope-aware file tools that name a bounded repo-relative target","Launch the children with worktree isolation so each owns its checkout","Reduce to one writing child in the shared checkout"],"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"}