{"record":{"id":"11f60cfa7dab9ed6","repo":"Hmbown/CodeWhale","slug":"tool-name-was-called-with-test-selection-argumen","errorCode":null,"errorMessage":"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.","messagePattern":"Tool (.+?) 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\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/subagent/mod.rs","lineNumber":15076,"sourceCode":"/// the role useless. But both tools accept an escape hatch that is not\n/// verification at all — `run_verifiers` takes `commands`, an array of arbitrary\n/// `program` + `args` pairs, and `run_tests` takes `args`, a raw cargo argv.\n/// `{\"program\": \"bash\", \"args\": [\"-lc\", \"rm -rf src\"]}` is exactly the raw shell\n/// that [`crate::fleet::exact::RAW_SHELL_DENYLIST`] just removed, re-entered\n/// through the one door that was left open for honest reasons.\n///\n/// So the tools stay and the arbitrary arguments go. The default form — the one\n/// the deny list's comment actually promises is bounded — keeps working.\nfn reject_unbounded_verification(name: &str, input: &Value, shell: bool) -> Result<()> {\n    use crate::tools::execution_envelope::{VerificationBound, classify_verification};\n\n    match classify_verification(canonical_action_alias(name, input), input) {\n        None | Some(VerificationBound::Default) => Ok(()),\n        // A pure test selection is what the shipped `verifier` role exists to\n        // run. It starts a process, so it costs shell authority — and nothing\n        // else, because `write` is not what a test filter needs.\n        Some(VerificationBound::Filter) if shell => Ok(()),\n        Some(VerificationBound::Filter) => Err(anyhow!(\n            \"Tool {name} was called with test-selection arguments, which start a test process, \\\n             and this agent has no shell authority. Drop `args` to run the default verification \\\n             gate.\"\n        )),\n        Some(VerificationBound::Unbounded) => Err(anyhow!(\n            \"Tool {name} was called with operator-supplied commands or arguments that can name a \\\n             program or redirect what runs, which spawns arbitrary programs and can mutate the \\\n             workspace. This agent runs read-only, so only the built-in verification gates and \\\n             test-selection arguments are available. Drop `commands`, drop the redirecting flag, \\\n             or use a write-capable role.\"\n        )),\n    }\n}\n\nfn is_internal_coordination_state_tool(name: &str) -> bool {\n    matches!(\n        name,\n        \"agent\"","sourceCodeStart":15058,"sourceCodeEnd":15094,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tools/subagent/mod.rs#L15058-L15094","documentation":"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.","triggerScenarios":"Thrown at crates/tui/src/tools/subagent/mod.rs:15076 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"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-14T00:17:10.932Z"}