Repository navigation
Description
Problem
A packaged macOS bb Nightly launched from the GUI can inherit a restricted PATH:
/usr/bin:/bin:/usr/sbin:/sbin
The server and plugin children then cannot resolve ordinary user-installed tools. In the affected case, a plugin-spawned Nightly CLI reports env: node: No such file or directory, and gh cannot be resolved. The same tools resolve from an interactive agent shell.
This leaves queue readers and Companion blind while the interactive shell still appears healthy.
Reproduction
- Launch the packaged Nightly from the GUI rather than an interactive terminal.
- Use a plugin path that spawns the bundled CLI and an external
nodeorghchild. - Observe the missing-command failures.
- Run the equivalent command from an interactive shell and observe that both tools resolve.
Expected behavior
Packaged GUI/server/plugin processes should receive a deterministic, usable user-tool PATH, or should use explicit validated executable paths. If a required executable is unavailable, the affected reader should report a visible degraded state rather than silently appearing healthy.
Implementation clue
The desktop source already probes a login shell for packaged macOS launches and falls back to the inherited environment on failure or timeout. The plugin child inherits the server environment. Please make PATH propagation deterministic and add a regression test covering the packaged-child environment and the missing-executable/degraded-state path. Preserve fail-closed behavior; do not make command discovery depend on a shell watcher.
Related historical reports include #1545 and #1388, but neither covers this packaged-Nightly plugin/Companion failure.
AGENT GENERATED
Stable/Nightly bundle comparison
Static extraction from installed stable 0.39.0 and Nightly 0.39.1-nightly.32633481796.1 rules out a Nightly build-target omission:
- both
app.asarbundles callensurePackagedUserShellPath(...)unconditionally at the start ofrunDesktopApp(); - the call sites are byte-identical;
- the complete
desktop-shell-pathimplementations are byte-identical (SHA-256fe1bab92b8032da3f978c217e3c54fbcfb2bca7e98ee030f21975c1c889e949b); - the only gates are platform (
darwinorlinux) andapp.isPackaged; - on macOS the implementation runs
/bin/zsh -ilc 'printf "%s" "$PATH"'with a 2,000 ms timeout, then preserves the inherited PATH on any error, signal, nonzero status, or empty output.
Both app bundles pass codesign --verify --deep --strict; this is not a missing or invalid app signature.
A no-restart reproduction using each app's signed Electron executable in Node mode, with the same restricted inherited PATH, returns the same result for stable and Nightly:
spawnSync /bin/zsh ETIMEDOUT- status
13 - empty stdout
The equivalent login-shell command outside that Electron path completes and resolves both node and gh. The running Nightly desktop, bridge, server, and host daemon therefore retain /usr/bin:/bin:/usr/sbin:/sbin because the packaged shell probe times out and takes its fallback path.
This narrows the defect to runtime PATH acquisition, not build-target gating. The packaged path repair needs a deterministic method that does not discard a valid user PATH merely because interactive shell startup exceeds two seconds (for example, a larger/tested bound or a non-interactive shell-environment resolver), with regression coverage for timeout fallback and child inheritance.
Activity
SawyerHood commentedon Aug 27, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2343.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
Use the bundled npm and npx for server-side package-manager calls (#3914
ymichael commentedon Nov 17, 2026
Fixed by #6194: there's now one shared PATH resolver with fallback directories, and it probes again when a command is missing. The remaining
.zshrctimeout case is tracked in #6586. Closing.