Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): managed Codex renews a ChatGPT token the API reports as expired #29946

Closedjuliusmarmingewants to merge 5 commits intomain fromfix/issue-29927opened View on GitHub

Showing 8 changed files with 7 additions and 2 deletions (loading 6).

x
0 of 8 viewed, 8 left
6 additions and 2 deletionsapps/server/src/cli/managedChatGptToken.tsModified
View file
@@ -11,6 +11,7 @@
Protocol.Request.fields.instanceId,
Protocol.Request.fields.environmentId,
Protocol.Request.fields.profileKey,
+ Protocol.Request.fields.launchId,
]),
);
const encodeRequest = Schema.encodeSync(Schema.fromJsonString(Protocol.Request));
@@ -21,14 +22,17 @@
/** Codex's auth.command protocol is a bare token on stdout, never a CLI diagnostic. */
export async function runManagedChatGptTokenCli(args: ReadonlyArray<string>): Promise<void> {
const program = Effect.gen(function* () {
- const [endpoint, instanceId, environmentId, profileKey] = yield* decodeArguments(args);
+ const [endpoint, instanceId, environmentId, profileKey, launchId] =
+ yield* decodeArguments(args);
const socket = yield* Effect.acquireRelease(
Effect.sync(() => NodeNet.createConnection(endpoint)),
(socket) => Effect.sync(() => socket.destroy()),
);
socket.on("error", () => {});
socket.once("connect", () =>
- socket.write(encodeRequest({ version: 1, instanceId, environmentId, profileKey }) + "\n"),
+ socket.write(
+ encodeRequest({ version: 1, instanceId, environmentId, profileKey, launchId }) + "\n",
+ ),
);
return yield* Protocol.readFrame(
socket,