Confirmed in source. The login shell probe runs exactly once, at desktop bootstrap: shellEnvironment.installIntoProcess in apps/desktop/src/app/DesktopApp.ts captures the shell env into the main process, the bundled server inherits it on spawn, and nothing ever re-captures it. The "Rescan server environment" button only calls discovery.refresh(), which re-runs the probes inside the server process, so it rechecks the same stale PATH it inherited at launch. That lines up with your 122 ENOENT gh spawns after installing brew. Worth noting for whoever picks this up: re-probing on rescan is the easy half, but the running server child can't have its env changed from outside, so the fresh PATH also needs a path into the server (control channel or a runner restart) before tool spawns see it.
[Bug]: macOS desktop never refreshes the login-shell environment after launch — tools installed later (Homebrew, gh, opencode, nvm node) stay invisible to agents and VCS#9429
Area: apps/desktop
Steps to reproduce
- Launch the packaged T3 Code app from Finder on a fresh macOS user that has no Homebrew yet.
- While the app is running, install Homebrew (
/opt/homebrew), which appendseval "$(/opt/homebrew/bin/brew shellenv zsh)"to~/.zprofile. Installghwith brew and authenticate it. - Also install a tool that only lands on PATH through
~/.zshrc(opencode in~/.opencode/bin, or node via nvm). - In an agent thread (Claude Code adapter) run
which brew gh opencode node, and open Settings → Source Control.
Expected behavior
After the shell profiles change, the app should re-capture the login-shell environment (at least on "Rescan server environment", ideally periodically or on profile mtime change) so that brew, gh, opencode, node resolve exactly like they do in Terminal.app.
Actual behavior
The desktop process keeps the PATH captured at launch and never probes again. Every later spawn of a bare tool name fails with ENOENT, even though the same commands work in Terminal.
Effective PATH of all T3 processes (from ps eww):
| 1 | /Users/dam/.local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:<cryptex paths>:/pkg/env/global/bin |
PATH from a real login shell on the same machine (zsh -il -c 'echo $PATH'):
| 1 | /Users/dam/.opencode/bin:/Users/dam/.nvm/versions/node/v26.8.1/bin:/Users/dam/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:... |
Timeline from ~/.t3/userdata/logs/*.trace.ndjson (all times local, same day):
| time | event |
|---|---|
| 12:10:45, 12:11:11 | desktop.shellEnvironment.installIntoProcess runs (Success, ~30 ms). These are the only two probes in the whole log. |
| 12:36 | codex installed (~/.local/bin/codex), ~/.zshrc edited (nvm, opencode) |
| 12:48 | Homebrew installed, ~/.zprofile edited at 12:51 |
| 12:39 → 14:45 | 122 × spawn gh ENOENT (gh pr list, gh --version probe, …). 0 successful gh spawns. |
| 12:10 → 12:29 | 12 × spawn codex ENOENT from probeCodexAppServerProvider (before codex was installed, expected) |
launchctl getenv PATH is empty on macOS 26, so there is no system-level fallback. opt/homebrew appears 0 times in the trace logs.
Impact
Major degradation or frequent failure
Version or commit
0.0.38 (packaged desktop app, com.t3tools.t3code)
Environment
macOS 26.6.2 (25G83), Apple Silicon (arm64), login shell /bin/zsh, Homebrew at /opt/homebrew, gh via Homebrew, node via nvm, opencode in ~/.opencode/bin, Claude Code adapter.
Logs
| 1 | {"type":"effect-span","name":"desktop.shellEnvironment.installIntoProcess",...,"startTimeUnixNano":"1788430271022664750","durationMs":30.7,"exit":{"_tag":"Success"}} |
| 2 | Error: spawn gh ENOENT (×122) |
Related
#7618 (Homebrew gh reported unavailable), #1787 / #1465 (closed: login-shell sync misses Homebrew), #7846 (nushell hydration).
Workaround
Quit and relaunch T3 Code after installing tools or editing shell profiles. Inside an agent thread, prefix commands with eval "$(/opt/homebrew/bin/brew shellenv zsh)" or use absolute paths.