From 705dc7097cb03a7d80390b27e24fcbb7e9cb043d Mon Sep 17 00:00:00 2001 From: "continue[bot]" <230936708+continue[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:38:21 -0800 Subject: [PATCH] Merge pull request #8674 from continuedev/dallinbriggs/8673-bash-tool-guidance Add guidance to Bash tools to prefer edit tools over bash commands --- core/tools/definitions/runTerminalCommand.ts | 1 + extensions/cli/src/tools/runTerminalCommand.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/tools/definitions/runTerminalCommand.ts b/core/tools/definitions/runTerminalCommand.ts index dbeaa5c05..ec7e29466 100644 --- a/core/tools/definitions/runTerminalCommand.ts +++ b/core/tools/definitions/runTerminalCommand.ts @@ -29,6 +29,7 @@ const RUN_COMMAND_NOTES = `The shell is not stateful and will not remember any p When a command is run in the background ALWAYS suggest using shell commands to stop it; NEVER suggest using Ctrl+C.\ When suggesting subsequent shell commands ALWAYS format them in shell command blocks.\ Do NOT perform actions requiring special/admin privileges.\ + IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc).\ ${PLATFORM_INFO}`; export const runTerminalCommandTool: Tool = { diff --git a/extensions/cli/src/tools/runTerminalCommand.ts b/extensions/cli/src/tools/runTerminalCommand.ts index 00204d55b..69706c21a 100644 --- a/extensions/cli/src/tools/runTerminalCommand.ts +++ b/extensions/cli/src/tools/runTerminalCommand.ts @@ -34,6 +34,8 @@ export const runTerminalCommandTool: Tool = { description: `Executes a terminal command and returns the output Commands are automatically executed from the current working directory (${process.cwd()}), so there's no need to change directories with 'cd' commands. + +IMPORTANT: To edit files, use Edit/MultiEdit tools instead of bash commands (sed, awk, etc). `, parameters: { type: "object",