Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex threads recover when the app-server exits #17046

Closeddominic-r(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/17046/headopened View on GitHub

Showing 10 changed files with 130 additions and 4 deletions (loading 7).

x
0 of 10 viewed, 10 left
12 additions and 3 deletionsapps/server/src/mcp/OrchestratorMcpToolkit.integration.test.tsModified
View file
@@ -3809,9 +3809,18 @@
Effect.gen(function* () {
const cwd = yield* checkpointWorkspace("delegated-task-status");
const rawTranscript = yield* readDelegatedTaskStatusTranscript();
- const transcript = yield* CodexOrchestratorReplayHarness.decodeTranscript(
- materializeReplayTranscriptWorkspace(rawTranscript, cwd),
- );
+ const workspaceTranscript = materializeReplayTranscriptWorkspace(rawTranscript, cwd);
+ // The recorder stopped Codex after its last frame, but this test keeps
+ // the parent turn running past the recording. Replaying that exit would
+ // end the session and fail the parent run.
+ const lastEntry = workspaceTranscript.entries.at(-1);
+ const transcript = yield* CodexOrchestratorReplayHarness.decodeTranscript({
+ ...workspaceTranscript,
+ entries:
+ lastEntry?.type === "runtime_exit"
+ ? workspaceTranscript.entries.slice(0, -1)
+ : workspaceTranscript.entries,
+ });
const layerOrchestrator = ProviderReplayHarness.layerProviderReplay(
name: "delegated-task-status/codex",
74 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -48,6 +48,8 @@
import * as PlatformError from "effect/PlatformError";
import * as Ref from "effect/Ref";
import * as Schema from "effect/Schema";