Skip to content

Commit 51c6daa

Browse files
authored
fix(server): treat a missing Codex rollout as a recoverable resume error (#6671)
1 parent 135dc15 commit 51c6daa

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
@@ -498,6 +498,18 @@ describe("isRecoverableThreadResumeError", () => {
498498
);
499499
});
500500

501+
it("matches a missing rollout for a known thread id", () => {
502+
NodeAssert.equal(
503+
isRecoverableThreadResumeError(
504+
new CodexErrors.CodexAppServerRequestError({
505+
code: -32603,
506+
errorMessage: "no rollout found for thread id 019fdf74-aaa9-7950-b252-7cc7a8650470",
507+
}),
508+
),
509+
true,
510+
);
511+
});
512+
501513
it("ignores non-recoverable resume errors", () => {
502514
NodeAssert.equal(
503515
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)