GeezerVison is showing github.com — [linux] can't find codex if installed via homebrew · Issue #234 · pingdotgg/t3code
[linux] can't find codex if installed via homebrew #234Labels bugSomething is broken or behaving incorrectly. DescriptionCodex provider status
Codex CLI (`codex`) is not installed or not on PATH.
Homebrew installs codex to /home/linuxbrew/.linuxbrew/bin but the program can't find it.
It also doesn't account for ~/.profile and ~/.bashrc for Linux, only for macOS via interactive shell.
Installing Codex elsewhere works. Reacted by Chindriș Mihai - Alexandru and David Sielert Activitymaria-rcks commented on Mar 7, 2026 can you run echo $PATH on your general shell? or whereis codex maria-rcks commented on Mar 7, 2026 baggiiiie commented on Mar 7, 2026 @maria-rcks same issue here on MacOS, fish shell (might be an issue with shell)
↪ whereis codex
codex: /opt/homebrew/bin/codex
Da1sypetals commented on Mar 7, 2026 same issue on MacOS:
> whereis codex
codex: /opt/homebrew/bin/codex
hwanseoc commented on Mar 7, 2026 under settings -> codex app server there's a setting to change codex binary path,
does this work? Da1sypetals commented on Mar 7, 2026
under settings -> codex app server there's a setting to change codex binary path, does this work?
Thanks! But it does not work lincolnthalles commented on Mar 7, 2026
can you run echo $PATH on your general shell? or whereis codex
codex: /home/linuxbrew/.linuxbrew/bin/codex
scode commented on Mar 7, 2026 Retracted comments unrelated to this issue (see #263 instead). lincolnthalles commented on Mar 7, 2026
under settings -> codex app server there's a setting to change codex binary path, does this work?
No. Also, the only way to access the settings is via Ctrl+,. There's no menu or button to the settings screen.
 BSchoolland commented on Mar 7, 2026 I have the same issue. A temporary fix I got from a helpful guy on Discord is to use a symlink:
sudo ln -s /opt/homebrew/bin/codex /usr/local/bin/codex
replace /opt/homebrew/bin/codex with the output of
whereis codex Reacted by notfrank and Denys Ivanchuk PunkUnknown commented on Mar 7, 2026
Same issue. Even did the symlink and it still fails Reacted by Da1sypetals, Iron and Yukai Huang Reacted by Da1sypetals, drakon and Yukai Huang rfrank14 commented on Mar 7, 2026
I have the same issue. A temporary fix I got from a helpful guy on Discord is to use a symlink: sudo ln -s /opt/homebrew/bin/codex /usr/local/bin/codex replace /opt/homebrew/bin/codex with the output of whereis codex
this worked for me, thanks!
i'm running bazzite dx. Bashamega commented on Mar 7, 2026 I just installed codex and it is working, without running any other commands.
Can you reinstall them again? jelenv commented on Mar 7, 2026 Same issue when codex is installed via bun. T3 Code cannot find it, even when the path to codex binary is configured in settings the-sides commented on Mar 9, 2026 When confirming symlink solution, make sure you test with a new thread. I was still having the same error on the thread I first discovered this issue and making a new thread confirmed that the symlink fix worked.
I'm on arch. Ryan-D-Gast commented on Mar 15, 2026 I'm using Omarchy (Arch) and I had the same issue when using a packaged version from AUR ('yay -S tscode-bin`). I thought I was a bug on my system but I fixed it by implementing the bug fix I put up in #1100. I am not happy with the change requiring changes across 4+ files so not sure if it will be accepted but that is what worked for me. DrLehman commented on Mar 15, 2026 davidsielert commented on Mar 16, 2026 Having the same issue with the latest version but came here to add that reinstalling codex cleanly seems to have fixed it but the error message lingers and will not disappear even if I restart t3code
 shivamhwp commented on Mar 18, 2026 can y'all try this !!
- uninstall codex from brew, remove the ~/.codex dir too.
- make sure you're on the latest version of t3code.
- fresh install codex.
- keep the binary and home path empty, it should auto recognize.
lmk if this is working !! domainus commented on Mar 23, 2026 I used codex to help debug this issue and this is what it came up with. It solved the issue on my end (Bazzite).
"I tracked this down on Linux/Bazzite and the issue is not that codex is necessarily missing. The problem is that T3 Code is launched as a GUI AppImage, and GUI apps often do not inherit the same PATH as an interactive shell.
What was found:
codex was installed and worked fine in a terminal.
- T3 Code still reported
Codex CLI (codex) is not installed or not executable.
- On this setup,
codex was available through shell startup configuration, but T3 Code did not read that environment when launched from the desktop.
- This is especially likely on immutable or desktop-managed Linux setups like Bazzite, where GUI app environment and shell environment can differ.
Temporary workaround:
- Create a launcher script that explicitly sets a PATH including common Linuxbrew and local bin locations before starting T3 Code:
sh
mkdir -p "$HOME/.local/bin"
cat > "$HOME/.local/bin/t3-code-alpha-launcher" <<'EOF'
#!/usr/bin/env sh
set -eu
export PATH="$HOME/.local/bin:$HOME/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH:-/usr/local/bin:/usr/bin:/bin}"
export DESKTOPINTEGRATION=1
exec "$HOME/AppImages/t3_code_alpha.appimage" --no-sandbox "$@"
EOF
chmod +x "$HOME/.local/bin/t3-code-alpha-launcher"
- Update the desktop entry so the app launches through that wrapper instead of directly launching the AppImage:
mkdir -p "$HOME/.local/share/applications"
cat > "$HOME/.local/share/applications/t3_code_alpha.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=T3 Code (Alpha)
Comment=T3 Code desktop build
Icon=$HOME/AppImages/.icons/t3_code_alpha
TryExec=$HOME/.local/bin/t3-code-alpha-launcher
Exec=$HOME/.local/bin/t3-code-alpha-launcher %U
Terminal=false
Categories=Development;
StartupWMClass=T3 Code (Alpha)
EOF
- Refresh desktop entries if available:
update-desktop-database "$HOME/.local/share/applications" || true
- Fully quit T3 Code and relaunch it from the application menu.
If using a pinned icon in a taskbar/dock, unpin and re-pin it first, because some desktop environments cache the old Exec= command.
Optional extra hardening:
Add a codex shim in ~/.local/bin so that anything that sees only local user binaries can still resolve codex:
cat > "$HOME/.local/bin/codex" <<'EOF'
#!/usr/bin/env sh
set -eu
for candidate in \
/home/linuxbrew/.linuxbrew/bin/codex \
/var/home/linuxbrew/.linuxbrew/bin/codex
do
if [ -x "$candidate" ]; then
exec "$candidate" "$@"
fi
done
echo "codex wrapper could not find a Homebrew codex binary" >&2
exit 127
EOF
chmod +x "$HOME/.local/bin/codex"
Suggested upstream fix:
T3 Code should not rely only on inherited PATH when validating or launching codex on Linux desktop builds.
A more robust approach would be:
- Try codex from the inherited PATH.
- If not found, probe a small set of common Linux install locations such as:
- /home/linuxbrew/.linuxbrew/bin/codex
- /var/home/linuxbrew/.linuxbrew/bin/codex
- $HOME/.local/bin/codex
- Fix the codex binary path override option.
- In the AppImage/desktop launcher, prepend a known-safe PATH for common user-level install locations before spawning the backend.
That would avoid false “not installed” errors on systems where GUI apps and shell sessions do not share the same environment." Reacted by Hwanseo Choi and Christoph added a commit that references this issue on Oct 7, 2026This issue will close once commit ef412bc is merged into the 'personal' branch.ef412bc
MetadataMetadatabugSomething is broken or behaving incorrectly. DevelopmentNo branches or pull requestsIssue actions
|