Repository navigation
Description
What happened
On a macOS background-service install, Claude and Codex both showed as not installed: Claude Agent CLI (\claude`) was not found on PATH.andCould not start Codex CLI (`codex`). Both CLIs were installed in ~/.local/bin` and worked from the user's shell. The periodic provider health check kept failing every 5 minutes for about 17 hours. Restarting the service fixed it at once.
Diagnosis
fixPath() (apps/server/src/os-jank.ts) runs once at startup (apps/server/src/server.ts:866), merging PATH from zsh -ilc into process.env.PATH. Nothing re-reads it.
Timeline (Nov 10, local): 13:50 launchd service installed (plist PATH lacks ~/.local/bin); 14:35 server started on 0.1.9-nightly.20261110.4478 and read PATH; 14:39 Claude Code installed to ~/.local/bin; 14:40 ~/.zshrc gained export PATH="$HOME/.local/bin:$PATH"; 14:41 Codex installed to ~/.local/bin.
Provider re-checks resolve the CLIs against the stale 14:35 PATH, so they fail until restart. The probe itself is fine: the same zsh -ilc call with the service's environment returns ~/.local/bin in ~13 ms, so this is not the timeout in #22336/#30746/#10534.
Possible fix: re-read login-shell PATH (rate-limited) before a provider re-check when a binary is missing, or say a restart is needed.
Steps to reproduce
- macOS, zsh. Make sure
~/.local/binis not on PATH in any shell startup file. - Install and start T3 Code as the background service (installed here via
npx t3). - While the server is running, install Claude Code with the native installer (puts
claudein~/.local/binand adds it to~/.zshrc). - In a new terminal,
which claudeworks. - In T3 Code, Settings → Providers → Claude shows "
claudewas not found on PATH". Waiting for the 5-minute health check does not help. - Restart the service (
launchctl kickstart -k gui/$(id -u)/com.t3tools.t3code.service). Claude is now detected.
Version
Server: 0.1.9-nightly.20261110.4478 (from /.well-known/t3/environment). The t3 triage CLI was 0.1.8. No commit on main through 2026-11-11 changes when PATH hydration runs (latest change to the probe: #32646, DEBUG-trap output).
Environment
- macOS 27.2 (Darwin 27.2.0), arm64, Mac mini
- zsh;
~/.local/binadded only in~/.zshrc - T3 Code running as launchd background service (
com.t3tools.t3code.service), connected from the desktop app on another Mac and over T3 Connect - Claude Code 2.1.322, Codex CLI 0.167.0 (both in
~/.local/bin)
Evidence
Provider cache before restart: claudeAgent `installed=false`, "`claude` was not found on PATH." (checkedAt 2026-11-11T12:47:34Z); codex `installed=false`, "Could not start Codex CLI".
`boot-service.log`: `Listening` at 14:35:03, then `WARN Claude Agent CLI health check failed. { errorTag: 'PlatformError' }` every 5 min until 07:47:34; after restart (`Listening` 07:52:01) both providers `installed=true status=ready`. No `[server] Failed to read PATH from login shell` warning, so the startup probe succeeded; it just ran before the PATH change.Related issues
- [Bug]: Linux server keeps the service PATH for its whole run when the login-shell PATH read times out at startup #22336 Linux server keeps the service PATH for its whole run when the login-shell PATH read times out at startup (same "hydrate once" design, different trigger)
- Desktop login-shell PATH probe times out on slow zsh startup, kills zsh mid
pyenv rehash, and never retries, leaving the server with a bare PATH #30746 login-shell PATH probe times out and never retries - First desktop launch after updating to nightly 20261101.4035 on macOS reports every provider CLI "not found on PATH" until relaunch #28714 first desktop launch after update reports every provider CLI "not found on PATH" until relaunch
- [Bug]: macOS 0.1.3 cannot find claude or gh although both resolve in the shell #26372 macOS cannot find claude in
~/.local/bin(possibly the same cause)
Fix applied or workaround
Restarting the server fixes it. As an extra safeguard I also added ~/.local/bin to EnvironmentVariables.PATH in ~/Library/LaunchAgents/com.t3tools.t3code.service.plist and reloaded it with launchctl bootout / bootstrap. Setting Settings → Providers → Binary path to the absolute path should also work.
Filed by
Claude Code (Claude Opus 5.5, claude-opus-5-5) via t3 triage.
Activity
Igloczek commentedon Nov 12, 2026
Same root cause hit on the desktop app (not the service), with OpenCode, on
0.1.10-nightly.20261112.4564, macOS 27 arm64, zsh.Timeline (local): 11:12 reboot → 11:16 desktop launches, the
zsh -ilccapture writesshell-environment-cache.jsonwithout~/.opencode/bin(at that point the opencodeexport PATHline in~/.zshrcwas missing) → 11:20 opencode reinstall adds the line to~/.zshrc→ 11:21 the provider check still reports "OpenCode CLI (opencode) is not installed or not on PATH." The server'sprocess.env.PATHmatches the 11:16 cache exactly;zsh -lic 'command -v opencode'finds it straight away.On the desktop path the server is started with
shellEnvironmentPrepared, sofixPath()skips its own read too. Nothing refreshes PATH until a full app restart. #23610 (merged after this nightly) lets Source Control Rescan refresh it, but provider re-checks still don't, so the "re-read before a provider re-check when the binary is missing" fix proposed here would cover the desktop case as well.Workaround: symlink the binary into a directory that's already on the captured PATH (e.g.
~/.local/bin), or restart T3 Code.Produced by Claude Opus 5.5 (Claude Code) following the T3 Code triage playbook.
viktorce commentedon Nov 20, 2026
This bug still reproduces on
mainate6e1ce70c8from 2026-11-20 on macOS.Reproduction
I ran
vp run devand the web client on macOS 27.2.1 arm64 with zsh 5.9. I pointed the server'sZDOTDIRat a throwaway folder. Its.zshrcsetsPATHand appends a line to a log each time zsh sources it. I set Claude's Binary path toclaude-lateand Codex's tocodex-late. Neither name existed in anyPATHfolder. Settings → Providers showed both as "Not found".With the server running:
claude-lateto the real Claude Code 2.1.311 andcodex-lateto the real Codex CLI 0.170.0 in one new folder. I appended that folder toPATHin the throwaway.zshrc. A newzsh -ilcran both.checkedAtfor both to the provider cache. Both still showed "Not found". The log had no new entry from the server, so the refresh did not start the login shell.Fix path
In step 3, the source control re-read added the folder to the server's
PATH, so the server found Codex, not Claude. Codex reads the server's live environment when it has no per-instance variables.apps/server/src/provider/Drivers/ClaudeDriver.ts:121copiesprocess.envat instance creation, so the server must rebuild a Claude instance.Since #37632 added
refreshHostPathatapps/server/src/provider/ProviderRegistry.ts:750, fixing macOS and Linux is a small change in existing code. On refresh it re-readsPATHwith a 10-second cache. WhenPATHgains a folder, it rebuilds enabled instances that are not installed. To readPATH,refreshHostPathcalls onlyrefreshWindowsPathatapps/server/src/os-jank.ts:225. On macOS and Linux,refreshWindowsPathreturnsfalseon its first line, so a refresh re-reads nothing.refreshPathFromLoginShellatapps/server/src/os-jank.ts:194already re-reads the login shell. Onlyapps/server/src/sourceControl/SourceControlDiscovery.ts:83calls it. CallingrefreshPathFromLoginShellfromrefreshHostPathuses the refresh-only design from #34514, so nothing new runs on the 5-minute health check.On macOS and Linux, the source control re-read can add the folder to
PATHbefore a refresh runs, as in step 3. Rebuilding only when the refresh's ownPATHread adds a folder would miss a Claude instance that is still stale.I can send that as a small PR, or test any other fix on macOS.
Tested with Claude Fable 5.2 in T3 Code. Written by Gemini 4 Neon.