@devries-cameron20 / t3code-1 / commits / dc72705818
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(source-control): nightly CLI builds again without Cursor Origin's undici import (#33483)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Nov 9, 2026 at 10:15 UTC dc7270581800518b9d7d4db6c8e13852067c8c2d
1 file changed +3 -17
packages/source-control-cursor-origin/src/server/OriginCli.ts
+3 -17
@@ -14,7 +14,6 @@ import * as Schema from "effect/Schema";
14 import * as Semaphore from "effect/Semaphore";
15 import { HttpClient, HttpClientRequest } from "effect/http";
16 import * as NodeHttpClient from "@effect/platform-node/NodeHttpClient";
17 -import { Agent } from "@effect/platform-node/Undici";
17 import { collectUint8StreamText } from "@t3tools/provider-core/server/collectStreamText";
18 import { decodeJsonResult } from "@t3tools/shared/schemaJson";
19 import { parseGitRemoteHost } from "@t3tools/source-control-core/shared/definition";
@@ -489,22 +488,9 @@ const make = Effect.gen(function* () {
488
489 /**
490 * Origin answers from a few hundred milliseconds away, so a new TLS connection doubles a request.
492 - * Undici's default drops an idle connection after four seconds, which a person reading a pull
493 - * request always outlasts; Origin keeps one open for minutes, and HTTP/2 carries a detail's
494 - * parallel reads on it at once.
491 + * A keep-alive agent holds idle connections until Origin closes them. Undici would add HTTP/2, but
492 + * the single-executable CLI cannot resolve its static import.
493 */
496 -const httpClientLayer = NodeHttpClient.layerUndiciNoDispatcher.pipe(
497 - Layer.provide(
498 - Layer.effect(NodeHttpClient.Dispatcher)(
499 - Effect.acquireRelease(
500 - Effect.sync(
501 - () =>
502 - new Agent({ allowH2: true, keepAliveTimeout: 300_000, keepAliveMaxTimeout: 300_000 }),
503 - ),
504 - (agent) => Effect.promise(() => agent.destroy()),
505 - ),
506 - ),
507 - ),
508 -);
494 +const httpClientLayer = NodeHttpClient.layerNodeHttpOptions({ keepAlive: true });
495
496 export const layer = Layer.effect(OriginCli, make).pipe(Layer.provide(httpClientLayer));