From fe2962965190f3b882a9ae7678b40f942fd9c8f5 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 27 Oct 2025 07:53:06 +0000 Subject: [PATCH] fix: clarify read_file tool single-file limitation for specific models - Updated getSimpleReadFileDescription to explicitly state it only supports reading one file at a time - Added note about using separate tool calls for multiple files - This fixes the documentation mismatch for models like grok-code-fast-1 that use the simplified format Fixes #8858 --- src/core/prompts/tools/simple-read-file.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/prompts/tools/simple-read-file.ts b/src/core/prompts/tools/simple-read-file.ts index 28f4f1129e..dcdfe0a9eb 100644 --- a/src/core/prompts/tools/simple-read-file.ts +++ b/src/core/prompts/tools/simple-read-file.ts @@ -8,6 +8,8 @@ export function getSimpleReadFileDescription(args: ToolArgs): string { return `## read_file Description: Request to read the contents of a file. The tool outputs line-numbered content (e.g. "1 | const x = 1") for easy reference when discussing code. +**IMPORTANT: This tool can only read ONE file at a time. Multiple file reads are not supported in this format.** + Parameters: - path: (required) File path (relative to workspace directory ${args.cwd}) @@ -31,5 +33,7 @@ Examples: 3. Reading a markdown file: README.md -` + + +Note: To read multiple files, you must use separate read_file tool calls for each file.` }