Hmbown/CodeWhale · error · anyhow::Error
Tool {name} was called with test-selection arguments, which
Error message
Tool {name} was called with test-selection arguments, which start a test process, and this agent has no shell authority. Drop `args` to run the default verification gate. What it means
Error "Tool {name} was called with test-selection arguments, which start a test process, and this agent has no shell authority. Drop `args` to run the default verification gate." thrown in Hmbown/CodeWhale.
Source
Thrown at crates/tui/src/tools/subagent/mod.rs:15076
/// the role useless. But both tools accept an escape hatch that is not
/// verification at all — `run_verifiers` takes `commands`, an array of arbitrary
/// `program` + `args` pairs, and `run_tests` takes `args`, a raw cargo argv.
/// `{"program": "bash", "args": ["-lc", "rm -rf src"]}` is exactly the raw shell
/// that [`crate::fleet::exact::RAW_SHELL_DENYLIST`] just removed, re-entered
/// through the one door that was left open for honest reasons.
///
/// So the tools stay and the arbitrary arguments go. The default form — the one
/// the deny list's comment actually promises is bounded — keeps working.
fn reject_unbounded_verification(name: &str, input: &Value, shell: bool) -> Result<()> {
use crate::tools::execution_envelope::{VerificationBound, classify_verification};
match classify_verification(canonical_action_alias(name, input), input) {
None | Some(VerificationBound::Default) => Ok(()),
// A pure test selection is what the shipped `verifier` role exists to
// run. It starts a process, so it costs shell authority — and nothing
// else, because `write` is not what a test filter needs.
Some(VerificationBound::Filter) if shell => Ok(()),
Some(VerificationBound::Filter) => Err(anyhow!(
"Tool {name} was called with test-selection arguments, which start a test process, \
and this agent has no shell authority. Drop `args` to run the default verification \
gate."
)),
Some(VerificationBound::Unbounded) => Err(anyhow!(
"Tool {name} was called with operator-supplied commands or arguments that can name a \
program or redirect what runs, which spawns arbitrary programs and can mutate the \
workspace. This agent runs read-only, so only the built-in verification gates and \
test-selection arguments are available. Drop `commands`, drop the redirecting flag, \
or use a write-capable role."
)),
}
}
fn is_internal_coordination_state_tool(name: &str) -> bool {
matches!(
name,
"agent"View on GitHub (pinned to 0c42157ee5)
Solutions
- Drop the args field so run_tests executes the default verification gate
- Use a write/shell-capable role if custom test argv is genuinely required
- Run the custom commands from the parent or a builder-role agent instead
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tools/subagent/mod.rs:15076 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/11f60cfa7dab9ed6.
Report an issue: GitHub.