Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(server): treat a missing Codex rollout as a recoverable resume error (#6671)

Rishet1151c6daa3bd1d
diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
index ec32b1dae..2a2de6839 100644
--- a/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
+++ b/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
@@ -498,6 +498,18 @@ describe("isRecoverableThreadResumeError", () => {
);
});
+ it("matches a missing rollout for a known thread id", () => {
+ NodeAssert.equal(
+ isRecoverableThreadResumeError(
+ new CodexErrors.CodexAppServerRequestError({
+ code: -32603,
+ errorMessage: "no rollout found for thread id 019fdf74-aaa9-7950-b252-7cc7a8650470",
+ }),
+ ),
+ true,
+ );
+ });
+
it("ignores non-recoverable resume errors", () => {
NodeAssert.equal(
isRecoverableThreadResumeError(
diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.ts
index 4af262415..8f887c1b5 100644
--- a/apps/server/src/provider/Layers/CodexSessionRuntime.ts
+++ b/apps/server/src/provider/Layers/CodexSessionRuntime.ts
@@ -58,6 +58,7 @@ const RECOVERABLE_THREAD_RESUME_ERROR_SNIPPETS = [
"no such thread",
"unknown thread",
"does not exist",
+ "no rollout found",
];
export function hasConfiguredMcpServer(appServerArgs: ReadonlyArray<string> | undefined): boolean {