From bdf77701cf0cae6834508f061c1053cfcee65546 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sun, 5 Oct 2025 23:55:01 -0500 Subject: [PATCH] fix: add timeout message if command times out (#2986) --- packages/opencode/src/tool/bash.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts index ddf8227e..0e1d37ec 100644 --- a/packages/opencode/src/tool/bash.ts +++ b/packages/opencode/src/tool/bash.ts @@ -201,6 +201,10 @@ export const BashTool = Tool.define("bash", { output += "\n\n(Output was truncated due to length limit)" } + if (process.signalCode === "SIGTERM" && params.timeout) { + output += `\n\n(Command timed out after ${timeout} ms)` + } + return { title: params.command, metadata: {