Hmbown/CodeWhale · error · anyhow::Error

Tool {name} cannot prove a bounded file target, and another

Error message

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.

What it means

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.

Source

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

                                        capability,
                                        ToolCapability::WritesFiles
                                            | ToolCapability::ExecutesCode
                                            | ToolCapability::Network
                                    )
                                })))
                }))
        {
            let manager = self.coordination_manager.read().await;
            // Only a *contended* shared checkout needs this gate. The claim
            // exists so concurrent children cannot overwrite each other; a lone
            // writer has no peer to collide with, and blocking it there bought
            // no safety while making a builder unable to run ordinary shell
            // work in the workspace the operator actually watches — worktree
            // isolation "fixes" that by writing somewhere they never see.
            if manager.shared_write_claim(&self.owner_agent_id).is_some()
                && manager.has_peer_shared_write_claim(&self.owner_agent_id)
            {
                return Err(anyhow!(
                    "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."
                ));
            }
        }
        let context = self
            .registry
            .context()
            .clone()
            .with_owner_agent(self.owner_agent_id.clone(), self.owner_agent_name.clone());
        self.registry
            .execute_rich_full_with_context(name, input, Some(&context))
            .await
            .map_err(|e| anyhow!(e))
    }

    #[cfg(test)]
    async fn execute(&self, agent_id: &str, name: &str, input: Value) -> Result<String> {
        self.execute_full(agent_id, "", name, input)

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Use scope-aware file tools that name a bounded repo-relative target
  2. Launch the children with worktree isolation so each owns its checkout
  3. Reduce to one writing child in the shared checkout
Defensive patterns

Strategy: validation

When it happens

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