@devries-cameron20 / t3code Mirror · read-only / commits / 2a264adc6f
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 01:30 UTC

fix(server): explain how to configure a missing Codex executable (#11345)

shivam committed Sep 15, 2026 at 22:41 UTC 2a264adc6f6c65f98d4273acaa1af567eca83f2a
2 files changed +29 -13
apps/server/src/provider/Layers/CodexProvider.ts
+4 -1
@@ -628,7 +628,10 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu
628 auth: { status: "unknown" },
629 message: installed
630 ? `Codex app-server provider probe failed: ${error.message}.`
631 - : "Codex CLI (`codex`) was not found on PATH.",
631 + : `Could not start Codex CLI (\`${codexSettings.binaryPath}\`). Check Settings → Providers → Codex → Binary path on the server.` +
632 + (codexSettings.binaryPath === "codex"
633 + ? " Installing ChatGPT or Codex desktop may not add codex to PATH."
634 + : " Make sure the configured executable exists and can be run."),
635 },
636 });
637 }
apps/server/src/provider/Layers/ProviderRegistry.test.ts
+25 -12
@@ -513,20 +513,35 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
513 }),
514 );
515
516 - it.effect("returns unavailable when codex is missing", () =>
516 + it.effect.each([
517 + "codex",
518 + "/Applications/Custom App.app/Contents/Resources/codex",
519 + "C:\\Tools\\codex.exe",
520 + ])("explains how to configure a Codex executable that cannot start: %s", (binaryPath) =>
521 Effect.gen(function* () {
518 - const status = yield* checkCodexProviderStatus(defaultCodexSettings, () =>
519 - Effect.fail(
522 + const settings = { ...defaultCodexSettings, binaryPath };
523 + const status = yield* checkCodexProviderStatus(settings, (input) => {
524 + assert.strictEqual(input.binaryPath, binaryPath);
525 + return Effect.fail(
526 new CodexErrors.CodexAppServerSpawnError({
521 - command: "codex app-server",
522 - cause: new Error("spawn codex ENOENT"),
527 + command: `${binaryPath} app-server`,
528 + cause: new Error("spawn ENOENT"),
529 }),
524 - ),
525 - );
530 + );
531 + });
532 assert.strictEqual(status.status, "error");
533 assert.strictEqual(status.installed, false);
534 assert.strictEqual(status.auth.status, "unknown");
529 - assert.strictEqual(status.message, "Codex CLI (`codex`) was not found on PATH.");
535 + assert.include(status.message, binaryPath);
536 + assert.include(
537 + status.message,
538 + "Settings → Providers → Codex → Binary path on the server",
539 + );
540 + assert.strictEqual(
541 + status.message?.includes("Installing ChatGPT or Codex desktop"),
542 + binaryPath === "codex",
543 + );
544 + assert.strictEqual(settings.binaryPath, binaryPath);
545 }),
546 );
547
@@ -2331,10 +2346,8 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
2346 "Real Codex probe against a missing binary should surface as 'error' in the aggregator",
2347 );
2348 assert.strictEqual(codexPersonal?.installed, false);
2334 - assert.strictEqual(
2335 - codexPersonal?.message,
2336 - "Codex CLI (`codex`) was not found on PATH.",
2337 - );
2349 + assert.include(codexPersonal?.message, missingBinary);
2350 + assert.include(codexPersonal?.message, "Settings → Providers → Codex → Binary path");
2351 }).pipe(Effect.provide(runtimeServices));
2352 }),
2353 );