Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

remove the tool-selection flags that did nothing (#3211)

Sebastian Müllera3700282ca15
diff --git a/.changes/fix-tools-flag.md b/.changes/fix-tools-flag.md
new file mode 100644
index 0000000000..abbb735e5b
--- /dev/null
+++ b/.changes/fix-tools-flag.md
@@ -0,0 +1 @@
+- Removed the `-t/--tools`, `-nt/--no-tools` and `-nbt/--no-builtin-tools` flags. They were silently ignored; they now fail as unknown options.
diff --git a/crates/pa-cli/src/args.rs b/crates/pa-cli/src/args.rs
index f35b3f7810..f14152ae61 100644
--- a/crates/pa-cli/src/args.rs
+++ b/crates/pa-cli/src/args.rs
@@ -22,10 +22,6 @@ pub fn parse_thinking_level(value: &str) -> Option<ModelThinkingLevel> {
}
}
-/// Removed built-in tool names that used to exist and now produce an error.
-const REMOVED_BUILTIN_TOOL_NAMES: [&str; 5] = ["read", "write", "grep", "find", "ls"];
-/// Current built-in tool names reported in tool validation errors.
-const BUILTIN_TOOL_NAMES: [&str; 1] = ["ipython"];
/// Value flags whose free-form text may legitimately start with a dash.
const FREEFORM_VALUE_FLAGS: [&str; 2] = ["--goal", "--autonomous-gate"];
/// Prompt value flags whose text may look like a long option (YAML frontmatter).
@@ -158,9 +154,6 @@ pub struct Args {
pub fork: Option<String>,
pub session_dir: Option<String>,
pub models: Option<Vec<String>>,
- pub tools: Option<Vec<String>>,
- pub no_tools: bool,
- pub no_builtin_tools: bool,
pub print: bool,
pub export: Option<String>,
pub no_skills: bool,
@@ -320,30 +313,6 @@ pub fn parse_args(args: &[String]) -> Args {
.collect(),
);
}
- "--no-tools" | "-nt" => result.no_tools = true,
- "--no-builtin-tools" | "-nbt" => result.no_builtin_tools = true,
- "--tools" | "-t" => {
- let value = require_value!(arg);
- let tools: Vec<String> = value
- .split(',')
- .map(str::trim)
- .filter(|name| !name.is_empty())
- .map(str::to_string)
- .collect();
- let removed: Vec<&str> = tools
- .iter()
- .filter(|name| REMOVED_BUILTIN_TOOL_NAMES.contains(&name.as_str()))
- .map(String::as_str)
- .collect();
- if !removed.is_empty() {
- result.diagnostics.push(Diagnostic::error(format!(
- "Unknown built-in tool(s): {}. Available built-in tools: {}",
- removed.join(", "),
- BUILTIN_TOOL_NAMES.join(", ")
- )));
- }
- result.tools = Some(tools);
- }
"--thinking" => {
let level = require_value!(arg);
if let Some(level) = parse_thinking_level(&level) {
diff --git a/crates/pa-cli/src/command_registry.rs b/crates/pa-cli/src/command_registry.rs
index ab5e8575f9..e1099d74e2 100644
--- a/crates/pa-cli/src/command_registry.rs
+++ b/crates/pa-cli/src/command_registry.rs
@@ -324,14 +324,8 @@ const TOP_LEVEL_OPTION_GROUPS: &[OptionGroup] = &[
],
},
OptionGroup {
- heading: "Tool and resource options",
+ heading: "Resource options",
options: &[
- ("-t, --tools <list>", "Allowlist comma-separated tool names"),
- ("-nt, --no-tools", "Disable all tools by default"),
- (
- "-nbt, --no-builtin-tools",
- "Disable built-in tools by default",
- ),
("--skill <path>", "Load a skill (repeatable)"),
("-ns, --no-skills", "Disable skill discovery"),
(
diff --git a/crates/pa-cli/src/global_flags.rs b/crates/pa-cli/src/global_flags.rs
index fca4da387d..f8e84484de 100644
--- a/crates/pa-cli/src/global_flags.rs
+++ b/crates/pa-cli/src/global_flags.rs
@@ -5,7 +5,7 @@
use std::collections::HashSet;
/// Global flags that consume the next argument as their value.
-pub const GLOBAL_VALUE_FLAGS: [&str; 24] = [
+pub const GLOBAL_VALUE_FLAGS: [&str; 22] = [
"--mode",
"--daemon-socket",
"--provider",
@@ -17,8 +17,6 @@ pub const GLOBAL_VALUE_FLAGS: [&str; 24] = [
"--fork",
"--session-dir",
"--models",
- "--tools",
- "-t",
"--thinking",
"--skill",
"--prompt-template",
@@ -42,13 +40,11 @@ pub const PROMPT_RUN_FLAGS: [&str; 4] =
["--print", "-p", "--system-prompt", "--append-system-prompt"];
/// parseArgs-known long flags that take no separate value.
-const GLOBAL_BOOLEAN_FLAGS: [&str; 13] = [
+const GLOBAL_BOOLEAN_FLAGS: [&str; 11] = [
"--help",
"--version",
"--continue",
"--no-session",
- "--no-tools",
- "--no-builtin-tools",
"--no-skills",
"--no-prompt-templates",
"--no-themes",
diff --git a/crates/pa-cli/src/mode.rs b/crates/pa-cli/src/mode.rs
index 0501d1c873..979dd8a931 100644
--- a/crates/pa-cli/src/mode.rs
+++ b/crates/pa-cli/src/mode.rs
@@ -83,9 +83,6 @@ pub struct RuntimeConfig {
pub append_system_prompt: Vec<String>,
pub thinking: Option<pa_types::ai::ModelThinkingLevel>,
pub models: Option<Vec<String>>,
- pub tools: Option<Vec<String>>,
- pub no_tools: bool,
- pub no_builtin_tools: bool,
pub skills: Vec<PathBuf>,
pub no_skills: bool,
pub prompt_templates: Vec<PathBuf>,
@@ -266,9 +263,6 @@ pub fn runtime_config_from_args(
append_system_prompt: parsed.append_system_prompt.clone(),
thinking: parsed.thinking,
models: parsed.models.clone(),
- tools: parsed.tools.clone(),
- no_tools: parsed.no_tools,
- no_builtin_tools: parsed.no_builtin_tools,
skills,
no_skills: parsed.no_skills,
prompt_templates,
diff --git a/crates/pa-cli/tests/differential_cli.rs b/crates/pa-cli/tests/differential_cli.rs
index c36e7a22f9..ceb1db1e3c 100644
--- a/crates/pa-cli/tests/differential_cli.rs
+++ b/crates/pa-cli/tests/differential_cli.rs
@@ -96,8 +96,6 @@ const CORPUS: &[&[&str]] = &[
&["--fork"],
&["--session-dir"],
&["--models"],
- &["--tools", "read,write"],
- &["--tools", "read"],
&["--goal-token-budget", "5"],
&["--goal", ""],
&["--goal", " "],