pingdotgg / pingdotgg/t3code

[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

Open
#9,429 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Area: apps/desktop

Steps to reproduce

  1. Launch the packaged T3 Code app from Finder on a fresh macOS user that has no Homebrew yet.
  2. While the app is running, install Homebrew (/opt/homebrew), which appends eval "$(/opt/homebrew/bin/brew shellenv zsh)" to ~/.zprofile. Install gh with brew and authenticate it.
  3. Also install a tool that only lands on PATH through ~/.zshrc (opencode in ~/.opencode/bin, or node via nvm).
  4. 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):

/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'):

/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

{"type":"effect-span","name":"desktop.shellEnvironment.installIntoProcess",...,"startTimeUnixNano":"1788430271022664750","durationMs":30.7,"exit":{"_tag":"Success"}}
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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/desktop at the desktop.shellEnvironment.installIntoProcess entry point, then trace the Settings → Rescan server environment flow and the later agent and Source Control spawns. Verify how the packaged app captures the login-shell PATH and how profile changes could trigger another capture. Done means tools installed or exposed after launch resolve for agents and VCS without requiring a restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, typescript, zsh
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.