From 889b22dd8592db83f8f4bcf9e6e9585618b56e08 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 20 Aug 2026 10:45:12 +0200 Subject: [PATCH] Keep mise upgrades from pruning versions still in use mise ships with upgrade.auto_prune on, so `mise up` deletes the old install directory as soon as a tool upgrades. Long-running processes are still executing out of that directory, and some re-exec themselves by absolute path, so running `omarchy update` or `mup` breaks them mid-session. Claude Code is the case that surfaced it. It records its own binary path at startup and dispatches its bundled ugrep and bfs through it, so once the upgrade pruned that path its grep and find wrappers fell back to the mise wrapper in ~/.local/bin. That wrapper cannot stand in for the real binary here: a shebang script never sees the argv[0] it was invoked under, because the kernel hands the interpreter the script path instead. The dispatch collapsed to plain `claude -G`, which fails. Keeping the old versions costs some disk and leaves the stale directory behind until something prunes it deliberately, which is the cheaper half of the trade. Co-Authored-By: Claude Opus 5 (1M context) --- install/user/mise.sh | 4 ++++ migrations/1787215483.sh | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 migrations/1787215483.sh diff --git a/install/user/mise.sh b/install/user/mise.sh index a800393d..24f1cb7d 100644 --- a/install/user/mise.sh +++ b/install/user/mise.sh @@ -1,3 +1,7 @@ +# Upgrades must not delete the version a running process is executing from: +# mise up would prune the old install dir out from under a live session. +mise settings set upgrade.auto_prune false + omarchy-mise-install codex omarchy-mise-install claude omarchy-mise-install crush diff --git a/migrations/1787215483.sh b/migrations/1787215483.sh new file mode 100644 index 00000000..2e473ef0 --- /dev/null +++ b/migrations/1787215483.sh @@ -0,0 +1,3 @@ +echo "Stop mise upgrades from pruning versions still in use" + +mise settings set upgrade.auto_prune false