diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 11539c9a..71f9c1de 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -926,6 +926,14 @@ fn parse_args(args: &[String]) -> Result { } Ok(CliAction::Diff { output_format }) } + // `claw permissions ` falls through to the LLM when called + // with a subcommand argument because parse_single_word_command_alias + // only intercepts the bare single-word form. Catch all multi-word + // forms here and return a structured guidance error so no network + // call or session is created. + "permissions" => Err(format!( + "`claw permissions` is a slash command. Start `claw` and run `/permissions` inside the REPL.\n Usage /permissions [read-only|workspace-write|danger-full-access]" + )), "skills" => { let args = join_optional_args(&rest[1..]); match classify_skills_slash_command(args.as_deref()) {