Skip to content

Commit 507caa5

Browse files
committed
fix(server): treat a missing Codex rollout as a recoverable resume error
1 parent 6ae9662 commit 507caa5

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎apps/server/src/provider/Layers/CodexSessionRuntime.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,18 @@ describe("isRecoverableThreadResumeError", () => {
358358
);
359359
});
360360

361+
it("matches a missing rollout for a known thread id", () => {
362+
NodeAssert.equal(
363+
isRecoverableThreadResumeError(
364+
new CodexErrors.CodexAppServerRequestError({
365+
code: -32603,
366+
errorMessage: "no rollout found for thread id 019fdf74-aaa9-7950-b252-7cc7a8650470",
367+
}),
368+
),
369+
true,
370+
);
371+
});
372+
361373
it("ignores non-recoverable resume errors", () => {
362374
NodeAssert.equal(
363375
isRecoverableThreadResumeError(

‎apps/server/src/provider/Layers/CodexSessionRuntime.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const RECOVERABLE_THREAD_RESUME_ERROR_SNIPPETS = [
5858
"no such thread",
5959
"unknown thread",
6060
"does not exist",
61+
"no rollout found",
6162
];
6263

6364
export function hasConfiguredMcpServer(appServerArgs: ReadonlyArray<string> | undefined): boolean {

0 commit comments

Comments
 (0)