Repository navigation
Conversation
Agents start through mise's command wrappers, and mise builds the wrapper's PATH by placing the tool directories where the shims directory sits, which env-bootstrap puts after the system directories. Inside Claude, Codex and Grok the system ruby, python, node and go therefore beat the versions mise pins, while npm, npx and pip, which have no system copy, still came from mise. Ship mise's activate_aggressive setting so its tools stay in front wherever it builds a PATH, as the interactive hook already does. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryEnables
Reviews (1) · Last reviewed commit: "Keep mise tool paths ahead of system bin..." · Reviewed by Greptile |
|
GPT-6 High in Codex read the diff at |
What changes
Claude, Codex and Grok start through mise's command wrappers (#14233). The PATH mise hands the wrapper's child places the tool install directories after
/usr/bin: mise puts them where the shims directory sits, andenv-bootstrapappends the shims after the system directories so that login shells and the uwsm session never shadow/usr/bin(#6632). Inside an agent,ruby,python3,nodeandgotherefore resolve to the Arch packages instead of the versions mise pins for the project, whilenpm,npxandpip, which have no system copy, still come from mise. A Claude session in a repo pinned to Ruby 4.0.9 ranbin/scripts and hooks under the system 3.4, andnodev26 ran beside mise's Node 24npm. The terminal that launched the agent is unaffected, because the prompt hook prepends the tool directories there.#16593 restored the shims directory "after the real install dirs so they keep precedence", but both sit behind
/usr/bin.This ships mise's
activate_aggressivesetting inetc/mise/conf.d/omarchy.toml, so mise keeps its tool paths in front wherever it builds a PATH, as the interactive hook already does. Command-wrapper dispatch still precedes the install directories, so account selection keeps working.The test copies
omarchy.tomlinto the isolated system config beside the wrapper declarations, lets the fake agent print its PATH, and asserts that the agent sees the mise tool directory ahead of/usr/binwhen launched from a PATH shaped likeenv-bootstrap's. It fails onquattrowith the install directory after/usr/binand passes with the setting.Verification
bash test/shell.d/agent-account-exec-test.sh: with only the test change,not ok - an agent sees mise tool directories ahead of /usr/bin, the printed PATH showing/usr/binbeforeinstalls/claude/1.0.0/bin; with the setting, 39 ok.agent-account-test.sh(31 ok),agent-account-autoswitch-test.sh(14),agent-account-copy-test.sh(6),agent-account-recovery-test.sh(4),dev-env-path-test.sh(14),default-agent-test.sh(46),mise-dev-env-test.sh(7),mise-provision-test.sh(2),mise-agent-shims-migration-test.sh(3),preinstalls-test.sh(15): all pass.MISE_ACTIVATE_AGGRESSIVE=1 claudehad the mise Ruby at PATH position 2 and/usr/binat 21, versus 15 and 11 without it. With the setting in a system-level config and the user config masked, a child ofmise execgoes from/usr/binbefore the tool directories to the tool directories first. In an interactive shell with the setting on,command -v claudestill resolves to the command wrapper, andrubyto the pinned version.One thing to weigh:
activate_aggressivealso governs the interactive hook. Its documented effect is that mise tool paths stay ahead of PATH entries added after activation, so a user who deliberately shadows a mise tool from~/.bashrcwould notice. On this machine nothing observable changed. The narrower alternative is to reorder PATH insideomarchy-agent-account-execonly; happy to switch to that if preferred.Screenshots
No visible change: shell PATH order only.
🤖 Generated with Claude Code