Repository navigation
Conversation
…PATH mise 2026.10.23 stopped removing its wrapper directory before running a wrapper's command. Account dispatch then resolved the wrapper again instead of the CLI, and the second pass put the inherited PATH ahead of the project's mise tools, so a system ruby or python shadowed the pinned one in everything the agent ran. Fixes omacom#17163 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The changes appear safe to merge. SummaryAccount launches now skip mise’s wrapper when finding the agent CLI, preserving the project’s chosen tools.
No new actionable issues were found in the changes since the previous review. Reviews (2) · Last reviewed commit: "Restore mise account dispatch for nested..." · Reviewed by Greptile |
|
I hit the same mise 2026.10.23 change through mise also exports Clearing the marker before handing off fixes it. The script runs the real CLI directly, so nothing recurses: export PATH
unset __MISE_ACTIVE_WRAPPERS
exec "$agent_binary" "$@"With this PR plus that line, |
|
Independently reproduced this on the issue reporter's machine with mise Compared:
Actual Ruby lookup: a project pins Ruby
The base process PATH puts Existing regression tests: I used the
The PR-only failure also prints This independently confirms @Jitheswar's result: the PR fixes the tool lookup, and clearing the active-wrapper marker is needed for the existing nested-account regression tests to pass: export PATH
unset __MISE_ACTIVE_WRAPPERS
exec "$agent_binary" "$@"Scope: this tests the real dispatch boundary, real Ruby versions, and the repository's account tests. It does not launch authenticated Claude/Codex/Grok sessions or validate directory changes/worktrees inside a running agent. |
Clear the active-wrapper marker before executing the resolved CLI so a same-provider child enters account dispatch again. The existing real-mise account tests reproduce the skipped dispatch without this reset. This implements the correction reported by Jitheswar and confirmed by amalrik. Describe wrapper removal at the boundary that now performs it, rather than claiming mise has already removed it. Co-Authored-By: GPT-6 High (Codex) <noreply@openai.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
|
Pushed de4cad7 to clear On a disposable Omarchy ISO worker with mise 2026.11.9 and real Python 3.12.12, all three providers inherited system Python 3.14.10 on base, retained the project’s Python 3.12.12 with this change, and returned to system Python when the fix was reverted. The final branch passed all 129 CLI checks and 150 checks across the seven focused account, dispatch, autoswitch, copy, recovery, default-agent and preinstalls suites, including SSH-style mise shims. GPT-6 High in Codex reviewed this with Opus 5.5 High and muse-wonder via pi, thinking high. The final reviews found no source defects; agreement does not guarantee review independence. Their requested launch-path comparison also established a separate case: without interactive activation, both the parent and every tested branch retain system-first tool resolution. #18158 changes that global mise policy; the reviewers differed on whether that separate scope question should delay this fix. #14656 overlaps this dispatcher and must preserve both the wrapper bypass and marker reset if combined. Waiting on the maintainer. |
|
With this PR, an agent that moves to another project still gets the launch directory's tool versions. Putting the shims right after the wrappers fixes that. It's one line in the block this PR already changes; diff and test results are in #17163 (comment). Could it go in here? |
Since mise 2026.10.23, Claude, Codex and Grok started through account dispatch get the system's tools ahead of the project's mise tools. In a project that pins
python = "3.12", a terminal runs 3.12, but inside Claude Codepython3is/usr/bin/python33.14. The reporter's Rails project hit the same with Ruby, sobin/rails,bin/ciand git hooks failed inside the agent.omarchy-agent-account-execfinds the CLI withtype -P "$provider", relying on mise having removed its wrapper directory fromPATHbefore running the wrapper's command. mise 2026.10.23 (jdx/mise#15126) keeps that directory onPATHand tracks running wrappers in__MISE_ACTIVE_WRAPPERSinstead. Sotype -Pnow finds the wrapper again, account dispatch execs it, and mise's second pass hands the CLI the inheritedPATHwith the tool directories after/usr/bin.Account dispatch now takes the wrapper directory off
PATHbefore resolving the CLI. The existing line that puts it back in front for the agent's subprocesses is unchanged, so other agents stay reachable through their wrappers.Verified on Omarchy 4.5.0rc2 in a VM, launching
claudefrom an interactive shell in a project that pins Python 3.12:/usr/bin)/usr/bin)Tracing
PATHshowed it arriving atomarchy-agent-account-execin the right order with 2026.10.25; the reorder happens only on the second pass through the wrapper. That also explains why jdx/mise#15207, the same report against mise, couldn't be reproduced on plain mise.test/shell.d/agent-account-test.shgets one check, which fails on the current script and passes with this change.This touches the same file as #14656, which already conflicts with
quattrothere; its rewrite keeps thetype -Plookup, so it would need these lines too.Fixes #17163
🤖 Generated with Claude Code