From 9674cdd6798f4e1298111901fad8666f6aa9bdf6 Mon Sep 17 00:00:00 2001 From: tarik02 Date: Sat, 1 Aug 2026 17:59:40 +0000 Subject: [PATCH 1/6] fix(server): keep codex turn ids aligned --- .../Adapters/CodexAdapterV2.ts | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts index f528c278215..409fb41519e 100644 --- a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts @@ -902,6 +902,11 @@ interface PendingCodexSubagentTurnStarted { readonly startedAt: DateTime.Utc; } +interface PendingCodexRootTurn { + readonly turnInput: ProviderAdapterV2TurnInput; + readonly started: Deferred.Deferred; +} + type PendingCodexRuntimeRequest = | { readonly type: "approval"; @@ -1473,7 +1478,7 @@ export function makeCodexAdapterV2(adapterOptions: CodexAdapterV2Options): Provi }); const events = yield* Queue.unbounded(); const activeTurns = yield* Ref.make(new Map()); - const pendingRootTurns = yield* Ref.make(new Map()); + const pendingRootTurns = yield* Ref.make(new Map()); const turnWaiters = yield* Ref.make(new Map>()); const subagentThreads = yield* Ref.make(new Map()); const pendingSubagentTurns = yield* Ref.make( @@ -3215,11 +3220,12 @@ export function makeCodexAdapterV2(adapterOptions: CodexAdapterV2Options): Provi } const pendingRootTurn = (yield* Ref.get(pendingRootTurns)).get(payload.threadId); if (pendingRootTurn !== undefined) { - yield* registerRootTurn({ - turnInput: pendingRootTurn, + const rootTurn = yield* registerRootTurn({ + turnInput: pendingRootTurn.turnInput, nativeTurnId: payload.turn.id, startedAt: codexTimestamp(payload.turn.startedAt), }); + yield* Deferred.succeed(pendingRootTurn.started, rootTurn); yield* Ref.update(pendingRootTurns, (current) => { const updated = new Map(current); updated.delete(payload.threadId); @@ -4486,20 +4492,21 @@ export function makeCodexAdapterV2(adapterOptions: CodexAdapterV2Options): Provi hasT3Mcp: McpProviderSession.readMcpProviderSession(turnInput.threadId) !== undefined, }); + const turnStarted = yield* Deferred.make(); yield* Ref.update(pendingRootTurns, (current) => { const updated = new Map(current); - updated.set(threadId, turnInput); + updated.set(threadId, { turnInput, started: turnStarted }); return updated; }); const started = yield* client.request("turn/start", turnStartParams); - const nativeTurnId = started.turn.id; - const startedAt = codexTimestamp(started.turn.startedAt); - yield* registerRootTurn({ turnInput, nativeTurnId, startedAt }); - yield* Ref.update(pendingRootTurns, (current) => { - const updated = new Map(current); - updated.delete(threadId); - return updated; - }); + const rootTurn = yield* Deferred.await(turnStarted); + if (started.turn.id !== rootTurn.nativeTurnId) { + yield* Effect.logWarning("orchestration-v2.codex-turn-id-mismatch", { + nativeThreadId: threadId, + responseNativeTurnId: started.turn.id, + notificationNativeTurnId: rootTurn.nativeTurnId, + }); + } }).pipe( Effect.ensuring( Effect.flatMap(getNativeThreadId(turnInput.providerThread), (threadId) => From 009bff169a138abc6c3ab1da44e94bc7861a1b73 Mon Sep 17 00:00:00 2001 From: tarik02 Date: Sat, 1 Aug 2026 18:07:58 +0000 Subject: [PATCH 2/6] fix(build): restore missing undici lockfile entry --- pnpm-lock.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 459161250b6..bb314a0f419 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9510,6 +9510,10 @@ packages: resolution: {integrity: sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==} engines: {node: '>=18.17'} + undici@6.28.0: + resolution: {integrity: sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==} + engines: {node: '>=18.17'} + undici@7.29.0: resolution: {integrity: sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==} engines: {node: '>=20.18.1'} @@ -19886,6 +19890,8 @@ snapshots: undici@6.26.0: {} + undici@6.28.0: {} + undici@7.29.0: {} undici@8.9.0: {} From 92b925d86fe26a4544d956a747c35e3dbe9b483a Mon Sep 17 00:00:00 2001 From: tarik02 Date: Sat, 1 Aug 2026 18:12:14 +0000 Subject: [PATCH 3/6] fix(build): align liquid glass lockfile snapshot --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb314a0f419..3d525a67042 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11085,7 +11085,7 @@ snapshots: '@bufbuild/protobuf@1.10.0': {} - '@callstack/liquid-glass@0.7.1(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)': + '@callstack/liquid-glass@0.7.1(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)': dependencies: react: 19.2.3 react-native: 0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3) From 5657b356a70cb2a3127d5b985a2a66aadc2a6ffe Mon Sep 17 00:00:00 2001 From: tarik02 Date: Sat, 1 Aug 2026 18:17:36 +0000 Subject: [PATCH 4/6] fix(web): restore compact project script controls --- apps/web/src/components/ProjectScriptsControl.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/ProjectScriptsControl.tsx b/apps/web/src/components/ProjectScriptsControl.tsx index fb5804be7b7..7d52264b6b5 100644 --- a/apps/web/src/components/ProjectScriptsControl.tsx +++ b/apps/web/src/components/ProjectScriptsControl.tsx @@ -363,7 +363,11 @@ export default function ProjectScriptsControl({