Uh oh!
There was an error while loading. Please reload this page.
Fix Linux desktop Codex CLI detection at startup - #1100
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
arthurbm
commented
Mar 17, 2026
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 One note: since #972 landed, the desktop side was refactored from |
Ryan-D-Gast
commented
Mar 18, 2026
Might need to rebase and refactor then. Thanks for letting me know! |
arthurbm
commented
Mar 18, 2026
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 |
5d7d29b to
b2c097dCompareRyan-D-Gast
commented
Mar 18, 2026
Rebased onto main and simplified the implementation:
All typechecks and tests pass. |
b2c097d to
b8b3aecCompareThere was a problem hiding this comment.
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.
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.
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

Hello, when running the
.AppImageon Linux and creating the corresponding.desktopapplication, t3code was unable to find thecodexCLI even though it was correctly available in my PATH (set in both.bashrcand.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
codexthe same way terminal launches do.Why
When launching from a Linux desktop entry, the app could report that the Codex CLI was missing or not executable even though
codexworked fine in the terminal. This happened for two reasons:Note
Fix Codex CLI detection on Linux by extending shell environment hydration to Linux
fixPathin os-jank.ts andsyncShellEnvironmentin syncShellEnvironment.ts to run on bothdarwinandlinux(previously macOS-only).resolveLoginShellin shell.ts to determine the login shell per platform: uses the provided$SHELL, falls back to/bin/zshon macOS and/bin/bashon Linux, and returnsundefinedon unsupported platforms.fixPathandsyncShellEnvironmentnow return early without modifying the environment if no login shell can be resolved (e.g. on Windows).fixPathnow accepts an options object forenv,platform, andreadPathoverrides and writesPATHback to the providedenvrather than alwaysprocess.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/linuxwith 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
resolveLoginShellhelper to choose a platform-appropriate default shell (/bin/zshon macOS,/bin/bashon Linux) and no-op on unsupported platforms, and adds tests verifying PATH/SSH_AUTH_SOCKhydration plus that serverfixPathruns before server start.Written by Cursor Bugbot for commit ccb8b25. This will update automatically on new commits. Configure here.