Skip to content

developer/shell runs with a truncated PATH (missing /opt/homebrew/bin): gh & brew 'not found', GitHub push fails #24

Description

@Broccolito

Summary

The developer/shell tool runs with a truncated PATH that omits /opt/homebrew/bin. As a result, Homebrew-installed CLIs — notably gh (GitHub CLI) and brew itself — are reported as "not found" even though they are installed, and a sequence of "push this project to GitHub" shell steps failed. This is a running-shell-scripts bug.

Direct evidence

A diagnostic tool call printed the shell's actual environment (session: starsign master conversation):

Current PATH:
/Applications/BioRouter.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin

Checking common gh locations:
not found: gh
FOUND /opt/homebrew/bin/gh -> /opt/homebrew/bin/gh
gh version 2.96.0 (2026-07-02)
...
Homebrew availability:
brew not on PATH
Homebrew 6.0.11
/opt/homebrew/opt/gh

So gh is installed (/opt/homebrew/bin/gh, v2.96.0) and brew is installed, but neither is on the PATH the shell tool uses. The bundled-app bin dir and the base system dirs are present; /opt/homebrew/bin is missing.

Failures this caused (all starsign master conversation)

# Result Cause
1 Module error: Tool error: [shell: command exited with status 10] Script guarded if ! command -v gh …; then … exit 10gh not on PATH.
2 Module error: Tool error: [shell: command exited with status 10] Same guard, second attempt.
3 (success, but) Checking common gh locations: not found: gh … gh: not found gh invocation fell through because PATH lacks /opt/homebrew/bin.

The agent only got unblocked after it manually probed a hard-coded list of paths and discovered gh at /opt/homebrew/bin/gh.

Impact

Any workflow that shells out to a Homebrew-installed tool (gh, and likely git-adjacent tooling, python from brew, node tools, etc.) will fail on a standard macOS/Apple-Silicon setup. GitHub push/publish flows are the obvious casualty.

Suggested fix

  • Have the shell tool inherit the user's login-shell PATH, or explicitly prepend the common Homebrew locations (/opt/homebrew/bin, /usr/local/bin) on macOS.
  • At minimum, document that the bundled shell environment is minimal and provide a supported way to extend PATH.

Environment

  • BioRouter desktop, macOS (Apple Silicon), developer extension.
  • Observed PATH: /Applications/BioRouter.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions