[codex] Fix terminal login shell environment#132
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
flashtype-website | ee2140b | Commit Preview URL Branch Preview URL |
Jun 17 2026, 06:45 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix Flashtype terminal sessions so bundled agent launches like Claude Code and Codex can resolve user-installed CLIs when the macOS app is launched from Finder or another GUI context.
Root Cause
The embedded terminal spawned the configured shell directly with no login-shell args and inherited Electron's sparse GUI app environment. On macOS, that can leave
PATHwithout Homebrew or local CLI install locations, producing errors likezsh: command not found: claudeeven though the command works in Terminal.app.Changes
PATHorder while appending missing platform fallback paths such as/opt/homebrew/bin,/opt/homebrew/sbin, and/usr/local/bin.Validation
node --check electron/terminal-shell.mjsnode --check electron/ipc-terminal.mjsnode --check electron/terminal-shell.test.mjsresolveShell,resolveShellArgs, andbuildTerminalEnvFull Vitest was not runnable in this checkout because
@lix-js/sdk@workspace:*is missing from the emptysubmodule/lixworkspace.Note
Medium Risk
Changes how every embedded PTY is spawned and which environment variables it receives; wrong PATH or login-shell behavior could break agent/CLI launches but scope is limited to the Electron terminal IPC path.
Overview
Fixes embedded terminal sessions so user-installed CLIs (e.g. Homebrew tools) work when the macOS app is started from Finder by inheriting a sparse GUI
PATH.Terminal creation now spawns common Unix shells with login-shell args (
-l) instead of a bare shell with empty argv, and builds the PTY environment through a sharedterminal-shell.mjshelper. On non-Windows platforms,PATHkeeps the inherited order and appends missing platform fallbacks (including/opt/homebrew/binon darwin), with deduplication; Windows behavior stays env spread plusTERM.ipc-terminal.mjsdrops its inlineresolveShelland wires inresolveShellArgsandbuildTerminalEnv. Vitest coverage was added for shell resolution, login args, PATH augmentation, and dedup.Reviewed by Cursor Bugbot for commit ee2140b. Bugbot is set up for automated code reviews on this repo. Configure here.