GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@Ryan-D-Gast Ryan-D-Gast commented Mar 15, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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:

  1. PATH hydration for desktop/server startup only handled macOS, so Linux GUI launches could miss shell-managed paths.
  2. 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
All reactions
  • 👀 1 reaction
@coderabbitai

coderabbitai Bot commented Mar 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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:

  • 🔍 Trigger review
✨ 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list. labels Mar 15, 2026
@Ryan-D-Gast Ryan-D-Gast mentioned this pull request Mar 15, 2026
[linux] can't find codex if installed via homebrew #234
Closed
@zortos293 zortos293 mentioned this pull request Mar 16, 2026
[Bug]: Codex CLI not found on Linux: fixPath() skips non-macOS and runs after health check #1139
Closed
2 tasks done
@arthurbm arthurbm mentioned this pull request Mar 17, 2026
fix: enable fixPath() on Linux and call it before health check #1140
Closed
2 tasks done
@arthurbm

arthurbm commented Mar 17, 2026

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Ryan-D-Gast

Ryan-D-Gast commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

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
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@arthurbm

arthurbm commented Mar 18, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Ryan-D-Gast
Ryan-D-Gast force-pushed the fix/linux-desktop-codex-path branch 2 times, most recently from 5d7d29b to b2c097d Compare March 18, 2026 19:38
@Ryan-D-Gast

Ryan-D-Gast commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

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
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Ryan-D-Gast
Fix Linux desktop Codex CLI detection
b8b3aec
@Ryan-D-Gast
Ryan-D-Gast force-pushed the fix/linux-desktop-codex-path branch from b2c097d to b8b3aec Compare March 27, 2026 05:36
cursor[bot]
cursor Bot reviewed Mar 27, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

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.

All reactions
Comment thread apps/server/src/os-jank.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread apps/desktop/src/syncShellEnvironment.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

juliusmarminge added 2 commits March 28, 2026 10:56
@juliusmarminge
use assert
ee0a191
@juliusmarminge
Support Linux login-shell PATH hydration
ccb8b25
- Extend PATH sync to Linux desktop and server startup
- Add tests for Linux handling and non-matching platforms
@juliusmarminge
juliusmarminge enabled auto-merge (squash) March 28, 2026 18:21
@juliusmarminge
juliusmarminge merged commit 32c1f98 into pingdotgg:main Mar 28, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

xddinside referenced this pull request in xddinside/t3code Apr 4, 2026
@Ryan-D-Gast @juliusmarminge @xddinside
Fix Linux desktop Codex CLI detection at startup (#1100)
cfb53dd
Co-authored-by: Julius Marminge <[email protected]>
youpele52 referenced this pull request in youpele52/bigbud Jun 17, 2026
@Ryan-D-Gast @juliusmarminge
Fix Linux desktop Codex CLI detection at startup (#1100)
9666000
Co-authored-by: Julius Marminge <[email protected]>
dcherrera pushed a commit to dcherrera/t3code that referenced this pull request Jul 7, 2026
@Ryan-D-Gast @juliusmarminge
Fix Linux desktop Codex CLI detection at startup (pingdotgg#1100)
c7cd667
Co-authored-by: Julius Marminge <[email protected]>
NeilTheFisher pushed a commit to NeilTheFisher/t3code that referenced this pull request Aug 18, 2026
@Ryan-D-Gast @juliusmarminge
Fix Linux desktop Codex CLI detection at startup (pingdotgg#1100)
00f0c9b
Co-authored-by: Julius Marminge <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Sep 12, 2026
feat(source-control): support Forgejo and Gitea with fj and tea #11436
Merged
@only21mil only21mil mentioned this pull request Nov 8, 2026
fix(github): load more gets past a page of pull requests updated in the same second #32771
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments

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.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AppImage not working on Linux? Homebrew Codex Unrecognized Codex CLI is installed but failed to run. 'codex' is not recognized as an internal or external command, operable program or batch file. [linux] can't find codex if installed via homebrew

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Ryan-D-Gast @arthurbm @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.