Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop stranding late delegated task reports #13338

Closedsaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intot3code/codex-turn-mapping fromrefs/pull/13338/headopened View on GitHub

Showing 4 changed files with 53 additions and 10 deletions (loading 3).

x
0 of 4 viewed, 4 left
53 additions and 10 deletionsapps/server/src/mcp/OrchestratorMcpToolkit.integration.test.tsModified
View file
@@ -2813,9 +2813,9 @@
return yield* Effect.die(new Error("Late completion successor delivery missing."));
- // The bounded successor can coalesce a late result only once. A
- // third terminal after that successor has started remains
- // inspectable, but cannot recursively create a third parent run.
+ // A terminal that lands after the successor has started is not
+ // stranded: once the successor settles, the cohort reserves one
+ // more delivery for it rather than leaving it pending forever.
const successorGate = yield* Deferred.make<void>();
deliveryTerminalGates.set(lateParentThreadId, successorGate);
yield* orchestrator.dispatch({
@@ -2884,7 +2884,7 @@
commandId: CommandId.make("command:mcp-late-parent:interrupt-third-late-child"),
threadId: thirdLateTask.childThreadId,
runId: thirdLateChildRun.id,
- reason: "Terminalize after the bounded successor started.",
+ reason: "Terminalize after the successor delivery started.",
yield* waitForProjection(
orchestrator,
@@ -2894,7 +2894,7 @@
?.completionDelivery?.state === "pending",
yield* Deferred.succeed(successorGate, undefined);
- const exhaustedCohort = yield* waitForProjection(
+ const thirdReserved = yield* waitForProjection(