Skip to content

Commit 517c4a4

Browse files
fix(codex): release timed-out app-server lanes
1 parent 136b34b commit 517c4a4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/agents/embedded-agent-runner/run.codex-app-server-recovery.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ describe("runEmbeddedAgent Codex app-server recovery", () => {
288288
runId: "run-codex-timeout-lane-release-second",
289289
});
290290

291-
await vi.advanceTimersByTimeAsync(30_001);
291+
await vi.advanceTimersByTimeAsync(29_999);
292+
expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(1);
293+
await vi.advanceTimersByTimeAsync(2);
292294

293295
await expect(firstRun).rejects.toMatchObject({ name: "CommandLaneTaskTimeoutError" });
294296
await expect(secondRun).resolves.toMatchObject({ meta: { aborted: false } });

src/agents/embedded-agent-runner/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ async function runEmbeddedAgentInternal(
18841884
once: true,
18851885
});
18861886
};
1887-
// Timeout recovery can continue after an attempt returns, but a native
1887+
// Timeout recovery can continue after an attempt returns, but a
18881888
// transport that ignores its timeout releases the lane after one grace.
18891889
let timeoutReleaseTimer: ReturnType<typeof setTimeout> | undefined;
18901890
const clearAttemptTimeoutRelease = () => {

0 commit comments

Comments
 (0)