remove max timeout

pull/5140/head
Aiden Cline 2025-12-05 16:28:32 -06:00
parent 639824b1ea
commit c75dae680a
1 changed files with 1 additions and 3 deletions

View File

@ -22,7 +22,6 @@ const MAX_OUTPUT_LENGTH = (() => {
return Number.isInteger(parsed) && parsed > 0 ? parsed : DEFAULT_MAX_OUTPUT_LENGTH
})()
const DEFAULT_TIMEOUT = 1 * 60 * 1000
const MAX_TIMEOUT = 10 * 60 * 1000
const SIGKILL_TIMEOUT_MS = 200
export const log = Log.create({ service: "bash-tool" })
@ -107,7 +106,7 @@ export const BashTool = Tool.define("bash", async () => {
if (params.timeout !== undefined && params.timeout < 0) {
throw new Error(`Invalid timeout value: ${params.timeout}. Timeout must be a positive number.`)
}
const timeout = Math.min(params.timeout ?? DEFAULT_TIMEOUT, MAX_TIMEOUT)
const timeout = params.timeout ?? DEFAULT_TIMEOUT
const tree = await parser().then((p) => p.parse(params.command))
if (!tree) {
throw new Error("Failed to parse command")
@ -170,7 +169,6 @@ export const BashTool = Tool.define("bash", async () => {
for (const arg of command.slice(1)) {
if (arg.startsWith("-") || (command[0] === "chmod" && arg.startsWith("+"))) continue
const resolved = await $`realpath ${arg}`
.cwd(cwd)
.quiet()
.nothrow()
.text()