GeezerVison is showing github.com — Fix Linux desktop Codex CLI detection at startup by Ryan-D-Gast · Pull Request #1100 · pingdotgg/t3code
Conversation
Ryan-D-Gast
commented
Mar 15, 2026
•
edited by macroscopeapp
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Hello, when running the .AppImage on Linux and creating the corresponding .desktop application, t3code was unable to find the codex CLI even though it was correctly available in my PATH (set in both .bashrc and .zshrc).
At first I assumed this was something specific to my system, but after digging into it I determined the issue was caused by how PATH hydration was handled in the t3code startup sequence. This PR fixes that
Fixes #234
Fixes #367
Fixes #269
Fixes #301
Also related to #226
What Changed
- Fixed desktop PATH hydration so Linux packaged launches resolve
codex the same way terminal launches do.
- Moved server PATH hydration earlier in startup so provider health checks run after PATH has been normalized.
- Added regression tests covering startup ordering and shared shell PATH behavior.
Why
When launching from a Linux desktop entry, the app could report that the Codex CLI was missing or not executable even though codex worked fine in the terminal. This happened for two reasons:
- PATH hydration for desktop/server startup only handled macOS, so Linux GUI launches could miss shell-managed paths.
- Provider health was computed before PATH normalization ran, which could cause the Codex status to be reported incorrectly during startup.
Note
Fix Codex CLI detection on Linux by extending shell environment hydration to Linux
- Extends
fixPath in os-jank.ts and syncShellEnvironment in syncShellEnvironment.ts to run on both darwin and linux (previously macOS-only).
- Adds
resolveLoginShell in shell.ts to determine the login shell per platform: uses the provided $SHELL, falls back to /bin/zsh on macOS and /bin/bash on Linux, and returns undefined on unsupported platforms.
- Both
fixPath and syncShellEnvironment now return early without modifying the environment if no login shell can be resolved (e.g. on Windows).
- Behavioral Change:
fixPath now accepts an options object for env, platform, and readPath overrides and writes PATH back to the provided env rather than always process.env.
Macroscope summarized ccb8b25.
Note Medium Risk
Changes process environment hydration on Linux and alters default shell selection behavior, which can impact CLI discovery and startup behavior across platforms. Risk is moderate due to OS-specific variability, but changes are guarded to only run on darwin/linux with added regression tests.
Overview
Fixes Linux packaged startup CLI detection by extending login-shell environment hydration to Linux in both desktop (syncShellEnvironment) and server (fixPath) startup.
Adds shared resolveLoginShell helper to choose a platform-appropriate default shell (/bin/zsh on macOS, /bin/bash on Linux) and no-op on unsupported platforms, and adds tests verifying PATH/SSH_AUTH_SOCK hydration plus that server fixPath runs before server start.
Written by Cursor Bugbot for commit ccb8b25. This will update automatically on new commits. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Chrissi2812 reacted with eyes emoji
coderabbitai
Bot
commented
Mar 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3e2e068f-20a6-464f-b122-c431d1781c2a
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I independently hit the same issue on Ubuntu 22.04 with the AppImage (v0.0.11) and arrived at the same fix. Tested locally with codex installed via nvm (Node v24) — after applying the platform guard change + moving fixPath() before Layer construction, the Codex provider status correctly shows "ready".
One note: since #972 landed, the desktop side was refactored from fixPath.ts to syncShellEnvironment.ts, so the platform guard change now needs to go in that file instead. The server-side os-jank.ts is unchanged.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
One note: since #972 landed, the desktop side was refactored from fixPath.ts to syncShellEnvironment.ts, so the platform guard change now needs to go in that file instead. The server-side os-jank.ts is unchanged.
Might need to rebase and refactor then. Thanks for letting me know!
|
arthurbm reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
One note: since #972 landed, the desktop side was refactored from fixPath.ts to syncShellEnvironment.ts, so the platform guard change now needs to go in that file instead. The server-side os-jank.ts is unchanged.
Might need to rebase and refactor then. Thanks for letting me know!
You're welcome! If you need any help, let me know! I really want this fix to land, so that I can normally use the app on Linux
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Rebased onto main and simplified the implementation:
- The fix now lives in
syncShellEnvironment.ts instead of the removed fixPath.ts (as noted, fix(desktop): backfill SSH_AUTH_SOCK from login shell on macOS #972 refactored the desktop side)
- Added
resolveLoginShell() helper to @t3tools/shared/shell for platform-aware shell resolution (darwin → zsh, linux → bash)
- Desktop:
syncShellEnvironment now supports both macOS and Linux
- Server:
fixPath() uses the same resolveLoginShell helper directly
- Removed the redundant
readPathForDesktopRuntime wrapper — both desktop and server compose the primitives directly
All typechecks and tests pass.
|
shivamhwp and arthurbm reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Extend PATH sync to Linux desktop and server startup
- Add tests for Linux handling and non-matching platforms
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|