relax task timeouts: stale timeout 3min→20min, session wait 30s→1min

This commit is contained in:
YeonGyu-Kim
2026-03-17 16:27:00 +09:00
parent 90351e442e
commit b788586caf
5 changed files with 36 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import type { BackgroundTask, LaunchInput } from "./types"
export const TASK_TTL_MS = 30 * 60 * 1000
export const TERMINAL_TASK_TTL_MS = 30 * 60 * 1000
export const MIN_STABILITY_TIME_MS = 10 * 1000
export const DEFAULT_STALE_TIMEOUT_MS = 180_000
export const DEFAULT_STALE_TIMEOUT_MS = 1_200_000
export const DEFAULT_MESSAGE_STALENESS_TIMEOUT_MS = 1_800_000
export const DEFAULT_MAX_TOOL_CALLS = 200
export const DEFAULT_CIRCUIT_BREAKER_WINDOW_SIZE = 20
@@ -0,0 +1,17 @@
declare const require: (name: string) => any
const { describe, expect, test } = require("bun:test")
import { DEFAULT_STALE_TIMEOUT_MS } from "./constants"
describe("DEFAULT_STALE_TIMEOUT_MS", () => {
test("uses a 20 minute default", () => {
// #given
const expectedTimeout = 20 * 60 * 1000
// #when
const timeout = DEFAULT_STALE_TIMEOUT_MS
// #then
expect(timeout).toBe(expectedTimeout)
})
})
@@ -3027,10 +3027,10 @@ describe("BackgroundManager.checkAndInterruptStaleTasks", () => {
prompt: "Test",
agent: "test-agent",
status: "running",
startedAt: new Date(Date.now() - 300_000),
startedAt: new Date(Date.now() - 25 * 60 * 1000),
progress: {
toolCalls: 1,
lastUpdate: new Date(Date.now() - 200_000),
lastUpdate: new Date(Date.now() - 21 * 60 * 1000),
},
}