From dcc8190933842b585a32240f2c7017bf88a12ec1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 28 Apr 2026 21:39:07 +0100 Subject: [PATCH] test(release): widen codex harness subagent probe --- src/gateway/gateway-codex-harness.live.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gateway/gateway-codex-harness.live.test.ts b/src/gateway/gateway-codex-harness.live.test.ts index 6d4795f7771..dad9a36e96b 100644 --- a/src/gateway/gateway-codex-harness.live.test.ts +++ b/src/gateway/gateway-codex-harness.live.test.ts @@ -520,6 +520,7 @@ async function readSpawnedChildRow(params: { childSessionKey: string; client: GatewayClient; parentSessionKey: string; + timeoutMs?: number; }): Promise | undefined> { const result = await params.client.request( "sessions.list", @@ -528,7 +529,7 @@ async function readSpawnedChildRow(params: { includeLastMessage: true, limit: 20, }, - { timeoutMs: 10_000 }, + { timeoutMs: params.timeoutMs ?? 10_000 }, ); const sessions = asRecord(result)?.sessions; if (!Array.isArray(sessions)) { @@ -545,7 +546,7 @@ async function waitForCodexSubagentStarted(params: { events: CapturedAgentEvent[]; parentSessionKey: string; }): Promise | undefined> { - const deadline = Date.now() + Math.min(CODEX_HARNESS_REQUEST_TIMEOUT_MS, 120_000); + const deadline = Date.now() + Math.min(CODEX_HARNESS_REQUEST_TIMEOUT_MS, 240_000); let lastRow: Record | undefined; let lastError: unknown; while (Date.now() < deadline) { @@ -554,6 +555,7 @@ async function waitForCodexSubagentStarted(params: { childSessionKey: params.childSessionKey, client: params.client, parentSessionKey: params.parentSessionKey, + timeoutMs: Math.min(30_000, Math.max(10_000, deadline - Date.now())), }); if ( lastRow &&