You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Codex CLI not found on Linux: fixPath() skips non-macOS and runs after health check #1139
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server, apps/desktop
Steps to reproduce
Install T3 Code on Linux via AppImage (v0.0.11)
Have codex installed via nvm (e.g. npm install -g @openai/codex)
Open the app and add a project
Observe the Codex provider status
Expected behavior
Codex provider status should show "ready" or an authentication status, since codex is installed and works from the terminal.
Actual behavior
The app shows:
Codex CLI (codex) is not installed or not on PATH.
Root cause
Two issues combine to cause this:
1. Shell environment sync only runs on macOS
Both apps/desktop/src/syncShellEnvironment.ts and apps/server/src/os-jank.ts have:
if(process.platform!=="darwin")return;
This skips PATH normalization entirely on Linux. On Linux (especially AppImage), the process environment doesn't include user shell paths (e.g. ~/.nvm/versions/node/*/bin), so CLIs installed via nvm/bun are not found.
2. Server calls fixPath() after the health check
In apps/server/src/main.ts, fixPath() is called inside Effect.gen at line 243:
yield*cliConfig.fixPath;
But ProviderHealthLive is constructed as a Layer (line 200), which runs before the Effect.gen body. The health check (codex --version) fires with the old PATH before fixPath() has a chance to correct it.
Note: apps/desktop/src/main.ts already calls syncShellEnvironment() at module top-level, which is the correct pattern.
Proposed fix
Change platform guard from !== "darwin" to === "win32" in both syncShellEnvironment.ts and os-jank.ts
Add a top-level fixPath() call in apps/server/src/main.ts (mirroring the desktop app pattern)
This is a ~5-line change across 3 files. The readPathFromLoginShell() / readEnvironmentFromLoginShell() utilities already work on Linux — they just were never called.
Impact
Complete failure — Codex provider is unusable on Linux.
changed the title [-][Bug]: Codex CLI not found on Linux — fixPath() skips non-macOS and runs after health check[/-][+][Bug]: Codex CLI not found on Linux: fixPath() skips non-macOS and runs after health check[/+]on Mar 16, 2026
Closing as duplicate of #632 and #372. PR #1100 already addresses both root causes (platform guard skipping Linux + fixPath running after health check). Tested locally and confirmed it resolves the issue.
Activity
[-][Bug]: Codex CLI not found on Linux — fixPath() skips non-macOS and runs after health check[/-][+][Bug]: Codex CLI not found on Linux: fixPath() skips non-macOS and runs after health check[/+]OzaS commentedon Mar 16, 2026
same on Mac. it finds codex first time but after reboot - not. CLI itself works fine
zortos293 commentedon Mar 16, 2026
Duplicate of #372 #301 #269 #246 #632
zortos293 commentedon Mar 16, 2026
#1100
#337
#793
#812
arthurbm commentedon Mar 17, 2026
Closing as duplicate of #632 and #372. PR #1100 already addresses both root causes (platform guard skipping Linux + fixPath running after health check). Tested locally and confirmed it resolves the issue.