diff --git a/src/agents/subagent-list.test.ts b/src/agents/subagent-list.test.ts index a90acec76671..740a8ae2bb9a 100644 --- a/src/agents/subagent-list.test.ts +++ b/src/agents/subagent-list.test.ts @@ -12,7 +12,8 @@ import { resetSubagentRegistryForTests, } from "./subagent-registry.test-helpers.js"; import type { SubagentRunRecord } from "./subagent-registry.types.js"; -import { STALE_UNENDED_SUBAGENT_RUN_MS } from "./subagent-run-liveness.js"; + +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; let testWorkspaceDir = os.tmpdir(); diff --git a/src/agents/subagent-registry-queries.test.ts b/src/agents/subagent-registry-queries.test.ts index bbea5a7e7b6f..8e7ca835f404 100644 --- a/src/agents/subagent-registry-queries.test.ts +++ b/src/agents/subagent-registry-queries.test.ts @@ -12,7 +12,8 @@ import { shouldIgnorePostCompletionAnnounceForSessionFromRuns, } from "./subagent-registry-queries.js"; import type { SubagentRunRecord } from "./subagent-registry.types.js"; -import { STALE_UNENDED_SUBAGENT_RUN_MS } from "./subagent-run-liveness.js"; + +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; function makeRun(overrides: Partial): SubagentRunRecord { const runId = overrides.runId ?? "run-default"; diff --git a/src/agents/subagent-run-liveness.test.ts b/src/agents/subagent-run-liveness.test.ts index ad9c58c96f7c..b18c0daef79c 100644 --- a/src/agents/subagent-run-liveness.test.ts +++ b/src/agents/subagent-run-liveness.test.ts @@ -5,10 +5,11 @@ import { isLiveUnendedSubagentRun, RECENT_ENDED_SUBAGENT_CHILD_SESSION_MS, isStaleUnendedSubagentRun, - STALE_UNENDED_SUBAGENT_RUN_MS, shouldKeepSubagentRunChildLink, } from "./subagent-run-liveness.js"; +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; + describe("subagent run liveness", () => { const now = Date.parse("2026-04-25T12:00:00Z"); diff --git a/src/agents/subagent-run-liveness.ts b/src/agents/subagent-run-liveness.ts index 424504392773..d91c551de414 100644 --- a/src/agents/subagent-run-liveness.ts +++ b/src/agents/subagent-run-liveness.ts @@ -7,7 +7,7 @@ import type { SubagentRunRecord } from "./subagent-registry.types.js"; import { resolveSubagentRunDurationMs } from "./subagent-run-timeout.js"; import { getSubagentSessionStartedAt } from "./subagent-session-metrics.js"; -export const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; export const RECENT_ENDED_SUBAGENT_CHILD_SESSION_MS = 30 * 60 * 1_000; const EXPLICIT_TIMEOUT_STALE_GRACE_MS = 60_000; const MIN_REALISTIC_RUN_TIMESTAMP_MS = Date.UTC(2020, 0, 1);