diff --git a/src/agents/bash-tools.exec-gateway-approval.e2e.test.ts b/src/agents/bash-tools.exec-gateway-approval.e2e.test.ts index 936814714b3c..801442dcf2f6 100644 --- a/src/agents/bash-tools.exec-gateway-approval.e2e.test.ts +++ b/src/agents/bash-tools.exec-gateway-approval.e2e.test.ts @@ -151,7 +151,7 @@ describe("gateway-hosted exec approvals", () => { const pending = await tool.execute("exec-approval-e2e", { command: "printf 'smoke\\n'", workdir: workspaceDir, - timeout: 5, + timeoutSeconds: 5, }); expect(pending.details.status).toBe("approval-pending"); diff --git a/src/agents/bash-tools.exec-run.ts b/src/agents/bash-tools.exec-run.ts index 8b67fbeacdb2..c71d4b09b4d2 100644 --- a/src/agents/bash-tools.exec-run.ts +++ b/src/agents/bash-tools.exec-run.ts @@ -421,7 +421,8 @@ export function createExecTool( strictInlineEval: defaults?.strictInlineEval, commandHighlighting: defaults?.commandHighlighting, trigger: defaults?.trigger, - timeoutSec: params.timeoutSeconds, + timeoutSec: + typeof params.timeoutSeconds === "number" ? params.timeoutSeconds : undefined, defaultTimeoutSec, approvalRunningNoticeMs, warnings, @@ -444,7 +445,8 @@ export function createExecTool( pathPrepend: defaultPathPrepend, requestedEnv, pty: params.pty === true && !sandbox, - timeoutSec: params.timeoutSeconds, + timeoutSec: + typeof params.timeoutSeconds === "number" ? params.timeoutSeconds : undefined, defaultTimeoutSec, security, ask, diff --git a/src/agents/bash-tools.exec.background-abort.test.ts b/src/agents/bash-tools.exec.background-abort.test.ts index 78317dd5d63b..6aa44b5c5896 100644 --- a/src/agents/bash-tools.exec.background-abort.test.ts +++ b/src/agents/bash-tools.exec.background-abort.test.ts @@ -232,7 +232,7 @@ test("background exec still times out after tool signal abort", async () => { executeParams: { command: BACKGROUND_HOLD_CMD, background: true, - timeout: BACKGROUND_TIMEOUT_SEC, + timeoutSeconds: BACKGROUND_TIMEOUT_SEC, }, abortAfterStart: true, expectedTimeoutSec: BACKGROUND_TIMEOUT_SEC, @@ -261,7 +261,7 @@ test("background exec with timeout zero bypasses default timeout", async () => { const result = await tool.execute("toolcall", { command: BACKGROUND_HOLD_CMD, background: true, - timeout: 0, + timeoutSeconds: 0, }); expect(result.details.status).toBe("running"); const sessionId = (result.details as { sessionId: string }).sessionId; @@ -279,7 +279,7 @@ test("yielded background exec still times out", async () => { executeParams: { command: BACKGROUND_HOLD_CMD, yieldMs: 5, - timeout: YIELDED_BACKGROUND_TIMEOUT_SEC, + timeoutSeconds: YIELDED_BACKGROUND_TIMEOUT_SEC, }, expectedTimeoutSec: YIELDED_BACKGROUND_TIMEOUT_SEC, }); diff --git a/src/auto-reply/reply/bash-command.ts b/src/auto-reply/reply/bash-command.ts index 397bdee16915..77064ef3c334 100644 --- a/src/auto-reply/reply/bash-command.ts +++ b/src/auto-reply/reply/bash-command.ts @@ -369,7 +369,7 @@ export async function handleBashChatCommand(params: { command: commandText, background: shouldBackgroundImmediately, yieldMs: shouldBackgroundImmediately ? undefined : foregroundMs, - timeout: timeoutSec, + timeoutSeconds: timeoutSec, elevated: true, }); diff --git a/src/auto-reply/reply/commands-diagnostics.ts b/src/auto-reply/reply/commands-diagnostics.ts index 436f4e36c7f7..95a41e530b13 100644 --- a/src/auto-reply/reply/commands-diagnostics.ts +++ b/src/auto-reply/reply/commands-diagnostics.ts @@ -313,7 +313,7 @@ async function requestGatewayDiagnosticsExportApproval( security: "allowlist", ask: "always", background: true, - timeout: timeoutSec, + timeoutSeconds: timeoutSec, }); if (result.details?.status === "approval-pending") { return { status: "pending" }; diff --git a/src/auto-reply/reply/commands-export-trajectory.ts b/src/auto-reply/reply/commands-export-trajectory.ts index e64f6cc76f1a..3ae64d943c0d 100644 --- a/src/auto-reply/reply/commands-export-trajectory.ts +++ b/src/auto-reply/reply/commands-export-trajectory.ts @@ -203,7 +203,7 @@ async function requestTrajectoryExportApproval( security: "allowlist", ask: "always", background: true, - timeout: timeoutSec, + timeoutSeconds: timeoutSec, }); return [ `Trajectory bundle: requested \`${request.displayCommand}\` through exec approval. Approve once to create the bundle; do not use allow-all for trajectory exports.`,