#569·memU

Inject silently no-ops when the agent's runtime PATH lacks the binary (pipx ~/.local/bin + GUI clients); verify gate misses it

Author: Shawn-DongCreated Jul 25, 2026Updated Jul 25, 2026

Summary

The inject seam tells the agent to run a bare command (<binary> retrieve "<query>"). That resolves only if the binary is on the agent's runtime PATH. When the agent runs in a GUI/desktop client (or any minimal-PATH shell), a pipx-style install in ~/.local/bin is typically not on that PATH — so the command fails with command not found, the agent concludes the tool "isn't installed", and the inject silently no-ops. The install's verify gate doesn't catch this because it checks resolution in the install shell, not the agent's.

Repro

  1. pip install memu-cli via pipx → binaries land in ~/.local/bin.
  2. Install the inject on any host (<binary> install-instruction); doctor and the Part-1 verify pass (the install shell has ~/.local/bin on PATH).
  3. Ask a memory-relevant question from the GUI client (not a terminal).

Observed (Hermes desktop, real screenshot): the agent runs memu-hermes retrieve "…", then replies "memu-hermes 这个工具在本机没装,先按普通对话来帮你想" ("memu-hermes isn't installed on this machine, I'll just help you the normal way") and answers with no memory. The exact same command works from a terminal.

Root cause

  • macOS (and many Linux desktop launchers) give GUI apps a minimal PATH (/usr/bin:/bin:/usr/sbin:/sbin) that excludes ~/.local/bin. Verified locally: env -i PATH="/usr/bin:/bin:/usr/sbin:/sbin" sh -c 'command -v memu-hermes' → not found.
  • The inject templates (RETRIEVAL_BODY, SKILL_TEMPLATE) all invoke {binary} by bare name, which assumes the binary is on the agent's runtime PATH.
  • The verify gate (doctor / the Part-3 retrieve smoke) runs in the installer's shell, which does have ~/.local/bin, so it passes — the failure only appears at agent runtime, where nobody is watching.

This is distinct from #566 (that was about skill-pointer vs inline shape). It affects every host whose agent runs in a minimal-PATH environment, not just Hermes — Codex happened to have a fuller runtime PATH and worked.

Why it matters

pipx (~/.local/bin) is the default for pip install memu-cli on managed-Python machines, and desktop agent clients are a primary target. So a real slice of users get a "successful" install whose memory inject never fires, with no error anywhere.

Suggested directions (deferring to maintainers; memU deliberately avoids absolute paths)

  1. Verify-gate detection — during install-instruction/doctor, re-resolve the binary from a minimal PATH (mimicking a GUI/headless agent). If it only resolves via a non-standard dir like ~/.local/bin, warn with the fix (symlink into /usr/local/bin, or add ~/.local/bin to the client's PATH). Turns a silent runtime failure into an actionable install-time warning without hardcoding paths.
  2. Docs note — add a "GUI PATH" caveat to the host INSTALL guides.
  3. (Stronger, more invasive) auto-symlink the binary into a standard PATH dir at install time.

Happy to send a PR for (1) + (2) if that direction is agreeable.