diff --git a/.changeset/disable-headers-timeout.md b/.changeset/disable-headers-timeout.md new file mode 100644 index 00000000..428394fe --- /dev/null +++ b/.changeset/disable-headers-timeout.md @@ -0,0 +1,5 @@ +--- +"@vercel/sandbox": patch +--- + +Disable `headersTimeout` on the default undici Agent so long-running `cmd.wait()` long-polls don't abort at undici's 5-minute default. Previously `bodyTimeout` was disabled but `headersTimeout` was left at the default, which cut off `cmd.wait()` when a sandbox command took longer than 5 minutes — even though the sandbox itself was still alive. diff --git a/packages/vercel-sandbox/src/api-client/base-client.ts b/packages/vercel-sandbox/src/api-client/base-client.ts index 42f83424..209997a7 100644 --- a/packages/vercel-sandbox/src/api-client/base-client.ts +++ b/packages/vercel-sandbox/src/api-client/base-client.ts @@ -15,6 +15,7 @@ export interface RequestParams extends RequestInit { const DEFAULT_AGENT = new Agent({ bodyTimeout: 0, // disable body timeout to allow long logs streaming + headersTimeout: 0, // disable headers timeout so long-poll cmd.wait() doesn't abort after undici's 5-min default }); /**