Skip to content

fix(gateway): include user-local bin paths in systemd unit PATH (salvage #3357 #3358 #3330 #3328) - #3527

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-a2b72b01
Mar 28, 2026
Merged

fix(gateway): include user-local bin paths in systemd unit PATH (salvage #3357 #3358 #3330 #3328)#3527
teknium1 merged 1 commit into
mainfrom
hermes/hermes-a2b72b01

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

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.

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>
@teknium1
teknium1 merged commit e295a22 into main Mar 28, 2026
4 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants