From c2f6d009118562c646540d36177b1092b29aee84 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Wed, 28 Jan 2026 13:02:06 -0700 Subject: [PATCH] docs: clarify read_command_output search param should be omitted when not filtering Add explicit guidance to the search parameter description telling models to omit the parameter entirely if not searching, rather than passing null or empty string. This prevents models from mistakenly passing literal "null" string as a search pattern. --- src/core/prompts/tools/native-tools/read_command_output.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/prompts/tools/native-tools/read_command_output.ts b/src/core/prompts/tools/native-tools/read_command_output.ts index 007915b005..44c069be1e 100644 --- a/src/core/prompts/tools/native-tools/read_command_output.ts +++ b/src/core/prompts/tools/native-tools/read_command_output.ts @@ -20,7 +20,7 @@ The tool supports two modes: Parameters: - artifact_id: (required) The artifact filename from the truncated output message (e.g., "cmd-1706119234567.txt") -- search: (optional) Pattern to filter lines. Supports regex or literal strings. Case-insensitive. +- search: (optional) Pattern to filter lines. Supports regex or literal strings. Case-insensitive. **Omit this parameter entirely if you don't need to filter - do not pass null or empty string.** - offset: (optional) Byte offset to start reading from. Default: 0. Use for pagination. - limit: (optional) Maximum bytes to return. Default: 40KB. @@ -38,7 +38,7 @@ Example: Finding specific test failures const ARTIFACT_ID_DESCRIPTION = `The artifact filename from the truncated command output (e.g., "cmd-1706119234567.txt")` -const SEARCH_DESCRIPTION = `Optional regex or literal pattern to filter lines (case-insensitive, like grep)` +const SEARCH_DESCRIPTION = `Optional regex or literal pattern to filter lines (case-insensitive, like grep). Omit this parameter if not searching - do not pass null or empty string.` const OFFSET_DESCRIPTION = `Byte offset to start reading from (default: 0, for pagination)`