summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorKit Langton <[email protected]>2026-04-14 12:55:03 -0400
committerGitHub <[email protected]>2026-04-14 12:55:03 -0400
commit4f967d5bc05d545fde9deccdb632276ec642722e (patch)
treef831db6598eabf5376c99bdb192bb1df23b66a0f /packages
parentff60859e3607c4f270fa50e5d56f8e1cbe763a6e (diff)
downloadopencode-4f967d5bc05d545fde9deccdb632276ec642722e.tar.gz
opencode-4f967d5bc05d545fde9deccdb632276ec642722e.zip
improve bash timeout retry hint (#22390)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/tool/bash.ts6
-rw-r--r--packages/opencode/test/tool/bash.test.ts1
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts
index 150cafbd7..ad6739b9a 100644
--- a/packages/opencode/src/tool/bash.ts
+++ b/packages/opencode/src/tool/bash.ts
@@ -437,7 +437,11 @@ export const BashTool = Tool.define(
).pipe(Effect.orDie)
const meta: string[] = []
- if (expired) meta.push(`bash tool terminated command after exceeding timeout ${input.timeout} ms`)
+ if (expired) {
+ meta.push(
+ `bash tool terminated command after exceeding timeout ${input.timeout} ms. If this command is expected to take longer and is not waiting for interactive input, retry with a larger timeout value in milliseconds.`,
+ )
+ }
if (aborted) meta.push("User aborted the command")
if (meta.length > 0) {
output += "\n\n<bash_metadata>\n" + meta.join("\n") + "\n</bash_metadata>"
diff --git a/packages/opencode/test/tool/bash.test.ts b/packages/opencode/test/tool/bash.test.ts
index 839c066c6..fc7a9e73e 100644
--- a/packages/opencode/test/tool/bash.test.ts
+++ b/packages/opencode/test/tool/bash.test.ts
@@ -1024,6 +1024,7 @@ describe("tool.bash abort", () => {
)
expect(result.output).toContain("started")
expect(result.output).toContain("bash tool terminated command after exceeding timeout")
+ expect(result.output).toContain("retry with a larger timeout value in milliseconds")
},
})
}, 15_000)