Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Merge #8032: fix(codex): keep Windows turns working when the Codex login cannot be linked

milind-sonid6c7560f2c45
diff --cc server/drivers/codex.test.ts
index 5ab66cb1db,0e31e587f8..d895669c91
--- a/server/drivers/codex.test.ts
+++ b/server/drivers/codex.test.ts
@@@ -24,9 -24,8 +24,9 @@@ import { codexCliOverrides } from "./co
import { codexReleaseUpdate } from "./codex-update.ts";
import { parseToml } from "../toml-lite.ts";
import * as codexProcess from "./codex-process.ts";
- import { CODEX_SIGN_IN_EXPIRED, codexLimitFacts, codexNotSignedIn, codexSignInRefused, codexUserError } from "./codex-errors.ts";
+ import { CODEX_SIGN_IN_EXPIRED, codexLimitFacts, codexNotSignedIn, codexSignInRefused, codexThreadBusyHelp, codexUserError } from "./codex-errors.ts";
import { CODEX_USAGE_LIMIT_REACHED } from "../../shared/codex-usage-limit.ts";
+import { turnClockLine } from "../turn-clock.ts";
import { removeTempDir } from "../testing/cleanup.ts";
import { TEAM_TOOLS_FAILED } from "./team-tools.ts";
import { unsupportedCallsNotice } from "./codex-unsupported-calls.ts";
diff --cc server/drivers/codex.ts
index b107c7547d,049f4e6aa0..ffb727ea1b
--- a/server/drivers/codex.ts
+++ b/server/drivers/codex.ts
@@@ -1327,10 -1326,10 +1326,10 @@@ export const CodexDriver: ProviderDrive
promptText,
);
}
- emit({ ...base(threadId, turnId), type: "session.started", sessionId: codexThreadId, model: startedModel ?? turn.model ?? null, ...(rebuiltFromReplay ? { rebuilt: true } : {}) });
- if (rebuiltFromReplay) emit({ ...base(threadId, turnId), type: "runtime.notice", message: droppedSession === "instruction-overflow" ? instructionsOverflowNotice("Codex") : rebuiltSessionNotice("Codex") });
+ emit({ ...base(threadId, turnId), type: "session.started", sessionId: codexThreadId, model: startedModel ?? turn.model ?? null, ...(rebuiltFromReplay || busySession ? { rebuilt: true } : {}) });
+ if (busySession || rebuiltFromReplay) emit({ ...base(threadId, turnId), type: "runtime.notice", message: sessionRebuildNotice("Codex", busySession, droppedSession) });
const turnInput = [
- ...(promptText ? [{ type: "text" as const, text: promptText }] : []),
+ ...(promptText ? [{ type: "text" as const, text: withTrailingTurnClock(promptText) }] : []),
...await codexImageInputs(turn.images),
];
const startTurn = () => {