Skip to content

The open source coding agent.

TypeScript

fix: add timeout message if command times out (#2986)

Aiden Clinebdf77701cf0c
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts
index ddf8227e9ea..0e1d37ecfd3 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: {