From 9a31b5b0de088704a79a0489c930b070c1960068 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Tue, 3 Feb 2026 15:37:18 -0500 Subject: [PATCH 1/3] fix: add missing return after exitWithNoMatchingRequestError in CI mode When running tests in CI mode with no cached response, the proxy would crash with ERR_HTTP_HEADERS_SENT because exitWithNoMatchingRequestError() calls onError() (which writes headers), but then execution continued to super.performRequest() which also tries to write headers. This caused cascading test failures because the proxy process would die and subsequent tests couldn't communicate with it. This is why the 'sendAndWait throws on timeout' test is currently skipped in CI. With this fix, that test could potentially be enabled. --- test/harness/replayingCapiProxy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/harness/replayingCapiProxy.ts b/test/harness/replayingCapiProxy.ts index a700596b..1602ef2a 100644 --- a/test/harness/replayingCapiProxy.ts +++ b/test/harness/replayingCapiProxy.ts @@ -292,6 +292,7 @@ export class ReplayingCapiProxy extends CapturingHttpProxy { state.workDir, state.toolResultNormalizers, ); + return; } super.performRequest(options); } catch (err) { From 03210356645617cc0e159df004a79d7734353b7d Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Tue, 3 Feb 2026 15:47:55 -0500 Subject: [PATCH 2/3] test: enable sendAndWait timeout test in CI Now that the harness properly returns after exitWithNoMatchingRequestError, this test can run in CI without crashing the proxy. --- nodejs/test/e2e/session.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodejs/test/e2e/session.test.ts b/nodejs/test/e2e/session.test.ts index 8e086023..b3fba475 100644 --- a/nodejs/test/e2e/session.test.ts +++ b/nodejs/test/e2e/session.test.ts @@ -384,9 +384,9 @@ describe("Send Blocking Behavior", async () => { expect(events).toContain("assistant.message"); }); - // Skip in CI - this test validates client-side timeout behavior, not LLM responses. - // The test intentionally times out before receiving a response, so there's no snapshot to replay. - it.skipIf(process.env.CI === "true")("sendAndWait throws on timeout", async () => { + // This test validates client-side timeout behavior. + // The snapshot has no assistant response since we expect timeout before completion. + it("sendAndWait throws on timeout", async () => { const session = await client.createSession(); // Use a slow command to ensure timeout triggers before completion From 92c2af601feed38f7c2442c9b0eb64a706c84e06 Mon Sep 17 00:00:00 2001 From: Adrien Friggeri Date: Wed, 4 Feb 2026 00:04:30 +0000 Subject: [PATCH 3/3] fix broken go test --- go/internal/e2e/session_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/go/internal/e2e/session_test.go b/go/internal/e2e/session_test.go index 19e42e49..62183286 100644 --- a/go/internal/e2e/session_test.go +++ b/go/internal/e2e/session_test.go @@ -388,11 +388,7 @@ func TestSession(t *testing.T) { } // Resume using a new client - newClient := copilot.NewClient(&copilot.ClientOptions{ - CLIPath: ctx.CLIPath, - Cwd: ctx.WorkDir, - Env: ctx.Env(), - }) + newClient := ctx.NewClient() defer newClient.ForceStop() session2, err := newClient.ResumeSession(t.Context(), sessionID)