Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): cap how long a Codex turn waits on a silent retry #33076

ClosedBleedingDev(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/33076/headopened View on GitHub

Showing 2 changed files with 129 additions and 1 deletion (loading 1).

x
0 of 2 viewed, 2 left
129 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -3490,7 +3490,12 @@
- const harness = yield* makeCodexReplayHarness(transcript);
+ const interrupts: unknown[] = [];
+ const harness = yield* makeCodexReplayHarness(transcript, undefined, (method, params) =>
+ Effect.sync(() => {
+ if (method === "turn/interrupt") interrupts.push(params);
+ }),
+ );
const now = yield* DateTime.now;
yield* harness.runtime.startTurn(
makeCodexTestTurnInput({
@@ -3502,6 +3507,9 @@
yield* harness.awaitTerminal(1);
+ // Recovery cancels the stalled-retry cap.
+ yield* TestClock.adjust("11 minutes");
+ assert.lengthOf(interrupts, 0);
const retryItems = harness.events.flatMap((event) =>
event.type === "turn_item.updated" &&
@@ -3551,6 +3559,126 @@