Stop an Omarchy mise wrapper (claude, gh, codex, omp) looping forever and burning CPU
Both triggers match #13040 (PATH snapshot with ~/.local/bin ahead of the install dir and shims, incl. the Hermes ACP and Electron-probe comments) and #13177 (mise cannot provide the bin, stub recurses). The wrapper template in /usr/bin/omarchy-mise-install on 4.0.4-1 is as described. Defects in the fix: (1) the Case 1 check mise ls --installed | grep -i omp can never match, because mise lists the tool as github:can1357/oh-my-pi, so it always falls through. Checked with mise ls --installed here. mise which --tool github:can1357/oh-my-pi omp is the working test and prints omp is not a mise bin when the tool cannot provide it. (2) pkill -f "$HOME/.local/bin/claude" kills by pattern. Replaced with kill by the PID pgrep shows. (3) The hardening is given as an edit of one line, but the stale pre---quiet wrappers most users still have would keep printing to stdout. The corrected fix writes the whole wrapper with --quiet. mise which --tool <pkg> <bin> was confirmed to exist in mise 2026.9.10 (-t, --tool) and to resolve gh to its install path here. Hardening is moved first because it fails fast (exit 1) for both triggers, which is what #13040 and its commenters confirmed. 'A later migration can put the old form back' was refined: upstream's 1787573629.sh skips edited wrappers, but omarchy-refresh-applications (which runs install/user/mise.sh) rewrites every default wrapper.
Symptom
Fans spin up and a core sits busy for hours. ps shows a ~/.local/bin/<tool> process repeatedly running mise use -g --quiet <tool> about twice a second in the same PID, often reparented to systemd --user. Or the machine becomes progressively unresponsive with thousands of short-lived processes when a terminal or editor calls omp or another wrapped tool. GUI apps that probe CLIs with a timeout (Hermes Desktop, Electron tools) report the tool as Not installed or hang. Nothing logs an error.
Cause
The wrapper omarchy-mise-install writes ends with exec mise x "<pkg>" -- "<bin>" "$@", and mise x resolves <bin> through PATH. Two shapes make it find the wrapper itself again. (1) The tool is not actually installed in mise (an install failed or never ran): no shim exists, so the wrapper in ~/.local/bin is the only <bin> on PATH, and stub and mise recurse as a fork storm. (2) A process inherited a PATH snapshot with ~/.local/bin ahead of both the tool's install directory and ~/.local/share/mise/shims, as in a systemd unit's Environment=PATH= or the child PATH Hermes gives ACP agents: with the shims directory present mise x leaves PATH order alone, so the wrapper re-execs itself in the same PID forever. Each iteration also runs mise use -g, which can silently upgrade the tool once mise's version cache expires.
Fix
Find the looping wrapper and stop it by PID:
pgrep -af "$HOME/.local/bin/"
kill <PID> # the PID of the wrapper that keeps running mise use -g
Make the wrapper exec an absolute path, so it can never find itself. When mise cannot provide the binary, mise which fails and the wrapper exits 1 instead of recursing, so this covers both triggers. Rewrite the whole wrapper, taking the package and binary from its existing exec mise x "<pkg>" -- "<bin>" line (gh shown):
cat > ~/.local/bin/gh <<'EOF'
#!/bin/bash
export MISE_MINIMUM_RELEASE_AGE=0
mise use -g --quiet "gh" || exit 1
bin_path=$(mise which --tool "gh" "gh") || exit 1
exec mise x "gh" -- "$bin_path" "$@"
EOF
chmod +x ~/.local/bin/gh
For a tool with a backend prefix use the package string from the old wrapper in all three places, for example "github:can1357/oh-my-pi" with binary "omp".
Then deal with the trigger.
Tool not provided by mise. Check, then install it once or remove the wrapper if you do not use the tool:
mise which --tool github:can1357/oh-my-pi omp # 'omp is not a mise bin' means mise cannot provide it
mise use -g github:can1357/oh-my-pi
# or: rm ~/.local/bin/omp
Bad PATH in a systemd unit or app. Drop the hardcoded Environment=PATH= so the unit inherits the session environment, or put ~/.local/share/mise/shims before ~/.local/bin in it:
systemctl --user cat <unit> | grep -n PATH
systemctl --user edit <unit>
systemctl --user restart <unit>
omarchy-refresh-applications, or running omarchy-mise-install for that command, rewrites the wrapper back to the stock form, so re-check it after either.
Verify
pgrep -af 'mise use -g' stays empty while the tool is idle, and the formerly looping command under the same environment returns promptly, for example systemctl --user restart <unit> followed by low CPU in top.