fix(gateway): include user-local bin paths in systemd unit PATH (salvage #3357 #3358 #3330 #3328) - #3527
Merged
Merged
Conversation
Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the systemd unit PATH so tools installed via uv/pipx/cargo/go are discoverable by MCP servers and terminal commands. Uses a _build_user_local_paths() helper that checks exists() before adding, and correctly resolves home dir for both user and system service types. Co-authored-by: kagura-agent <Kagura> Co-authored-by: ygd58 <buray> Co-authored-by: Mibayy <Mibay>
This was referenced Mar 28, 2026
Closed
1 task
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…Research#3527) Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the systemd unit PATH so tools installed via uv/pipx/cargo/go are discoverable by MCP servers and terminal commands. Uses a _build_user_local_paths() helper that checks exists() before adding, and correctly resolves home dir for both user and system service types. Co-authored-by: Kal Sze <ksze@users.noreply.github.com>
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…Research#3527) Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the systemd unit PATH so tools installed via uv/pipx/cargo/go are discoverable by MCP servers and terminal commands. Uses a _build_user_local_paths() helper that checks exists() before adding, and correctly resolves home dir for both user and system service types. Co-authored-by: Kal Sze <ksze@users.noreply.github.com>
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…Research#3527) Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the systemd unit PATH so tools installed via uv/pipx/cargo/go are discoverable by MCP servers and terminal commands. Uses a _build_user_local_paths() helper that checks exists() before adding, and correctly resolves home dir for both user and system service types. Co-authored-by: Kal Sze <ksze@users.noreply.github.com>
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…Research#3527) Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the systemd unit PATH so tools installed via uv/pipx/cargo/go are discoverable by MCP servers and terminal commands. Uses a _build_user_local_paths() helper that checks exists() before adding, and correctly resolves home dir for both user and system service types. Co-authored-by: Kal Sze <ksze@users.noreply.github.com>
jhuchler-iamds
referenced
this pull request
in IAMDS-GMBH/AIMDS-Agent
Jul 20, 2026
Port PR #3527's systemd fix to launchd (macOS): generate_launchd_plist() now calls _build_user_local_paths() so ~/.local/bin, ~/.cargo/bin, ~/go/bin, and ~/.npm-global/bin are always reachable, not just whatever happened to be in the captured shell PATH at install time. Fixes uv/uvx MCP servers being unreachable under the launchd-managed gateway. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…Research#3527) Add ~/.local/bin, ~/.cargo/bin, ~/go/bin, ~/.npm-global/bin to the systemd unit PATH so tools installed via uv/pipx/cargo/go are discoverable by MCP servers and terminal commands. Uses a _build_user_local_paths() helper that checks exists() before adding, and correctly resolves home dir for both user and system service types. Co-authored-by: Kal Sze <ksze@users.noreply.github.com>
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.
Consolidation of 4 duplicate PRs that all fix the same issue: systemd unit PATH missing user-local binary directories.
Problem: The generated systemd unit only includes venv, node_modules, and system bin paths. Tools installed via
uv,pipx,cargo,go, etc. at~/.local/bin,~/.cargo/bin, etc. aren't discoverable, breaking MCP servers and terminal commands.Fix: Adds
_build_user_local_paths()helper that discovers existing user-local bin dirs (~/.local/bin,~/.cargo/bin,~/go/bin,~/.npm-global/bin) and includes them in PATH. Correctly handles both user and system service home directories.Attribution: Best implementation structure from @ksze (#3357), tests from @kagura-agent (#3358), all 4 contributors credited.
Closes #3357, closes #3358, closes #3330, closes #3328.