From 9ef064a0415d50242df09be056adc41a2944c5f9 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Wed, 14 Jan 2026 19:00:53 +0530 Subject: [PATCH] Add guidance to shell tool description to avoid unnecessary cd prefixes LLMs were prefixing shell commands with `cd &&` unnecessarily, wasting tokens and cluttering CLI display. Added clear guidance in the shell tool description that commands already execute in the working directory. --- crates/g3-core/src/tool_definitions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/g3-core/src/tool_definitions.rs b/crates/g3-core/src/tool_definitions.rs index 58843a0..4199e50 100644 --- a/crates/g3-core/src/tool_definitions.rs +++ b/crates/g3-core/src/tool_definitions.rs @@ -51,7 +51,7 @@ fn create_core_tools(exclude_research: bool) -> Vec { let mut tools = vec![ Tool { name: "shell".to_string(), - description: "Execute shell commands".to_string(), + description: "Execute shell commands in the current working directory. Do NOT prefix commands with `cd &&` - commands already run in the workspace.".to_string(), input_schema: json!({ "type": "object", "properties": {