[codex] prevent ACP assistant ID collisions after restarts (#3932)

Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
Maxwell YoungandJulius Marminge authored and GitHub committed 2026-07-17 21:51:16 +02:00
1 parent b49a2e677c
commit bcd640bf4d
14 files changed
+90 -14

No files matched your search

@@ -1,3 +1,4 @@
import * as Crypto from "effect/Crypto";
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
import * as Ref from "effect/Ref";
@@ -38,6 +39,7 @@ export const makeCursorTextGeneration = Effect.fn("makeCursorTextGeneration")(fu
cursorSettings: CursorSettings,
environment?: NodeJS.ProcessEnv,
) {
const crypto = yield* Crypto.Crypto;
const commandSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const resolvedEnvironment = environment ?? process.env;
@@ -66,7 +68,7 @@ export const makeCursorTextGeneration = Effect.fn("makeCursorTextGeneration")(fu
childProcessSpawner: commandSpawner,
cwd,
clientInfo: { name: "t3-code-git-text", version: "0.0.0" },
});
}).pipe(Effect.provideService(Crypto.Crypto, crypto));
yield* runtime.handleSessionUpdate((notification) => {
const update = notification.update;