Skip to content

Commit ade4730

Browse files
ryanrhughesjuliusmarmingeclaude
authored
fix(server): mise-installed providers update through mise instead of their own updater (#21524)
Mise-owned providers requested as latest now update with mise upgrade <tool>; pinned tools, version paths and mise x scripts stay manual. Co-authored-by: Ryan Hughes <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 6417151 commit ade4730

11 files changed

Lines changed: 705 additions & 36 deletions

File tree

‎apps/server/src/provider/Drivers/ClaudeMaintenance.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const NativeVersion = Schema.String.check(Schema.isPattern(/^\d+\.\d+\.\d+$/));
2727
const update = makePackageManagedProviderMaintenanceResolver({
2828
provider: ProviderDriverKind.make("claudeAgent"),
2929
npmPackageName: "@anthropic-ai/claude-code",
30+
mise: { tool: "claude" },
3031
nativeUpdate: {
3132
args: ["update"],
3233
isCommandPath: (commandPath) => {

‎apps/server/src/provider/Drivers/CodexDriver.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function makeCodexMaintenanceResolver(sharedHomePath: string) {
8181
return makePackageManagedProviderMaintenanceResolver({
8282
provider: DRIVER_KIND,
8383
npmPackageName: "@openai/codex",
84+
mise: { tool: "codex" },
8485
nativeUpdate: {
8586
args: ["update"],
8687
isCommandPath: (commandPath) => codexStandaloneHome(commandPath) !== null,

‎docs/internals/providers.md‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,16 @@ either the resolved path or its real target, since those installers place real f
8888
symlinks there. Volta is proven by its `volta-shim` link plus the package's image directory. When
8989
nothing is proven, the provider's own updater (`claude update`, `codex update`, `opencode upgrade`,
9090
`pi update --self`, `grok update`) runs instead, because each one detects its installer itself;
91-
the runner's version check catches an updater that exits 0 without updating. Mise installs stay
92-
manual-only because their version is pinned in mise's config. A Grok cask whose Homebrew prefix
91+
the runner's version check catches an updater that exits 0 without updating. Mise is checked
92+
first, since a `mise x` wrapper can sit at a native installer's path, and `MISE_DATA_DIR` can put
93+
installs anywhere, so `mise which` is asked whenever mise is on `PATH`. Each driver names its fixed
94+
mise tool; mise must resolve the binary and list it in an active install of that tool requested as
95+
`latest`, which gets `mise upgrade <tool>`. T3 Code keeps launching the configured path, so that
96+
path must be a shim or under the tool's `latest` link, which the upgrade repoints: a version
97+
directory (including one `mise activate` put on `PATH`) would keep running the old binary until mise
98+
prunes it. Everything else mise touches (fixed version paths, pinned tools, wrappers, OpenCode 1.x,
99+
whose mise tool crosses into 2.x) stays manual-only, so T3 Code never edits mise config. `mise latest` supplies the version, because settings such as
100+
`minimum_release_age` can hold mise behind npm. A Grok cask whose Homebrew prefix
93101
cannot be verified also stays manual-only: `grok update` would install a second copy. npm updates pin `--prefix` because the
94102
`npm` on `PATH` can belong to a different Node than the one that owns the provider. Homebrew
95103
compares against `brew info` since casks trail npm by hours; native installs share npm's version

‎docs/user/install.md‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,14 @@ on the environment's machine. An unlisted version is unverified.
204204

205205
When a provider CLI is behind its latest release, its provider card shows the
206206
available version. **Update now** runs the installer that owns the CLI
207-
(Homebrew, or a global npm, pnpm, Yarn, Bun, Volta, or Vite+ install), or the
208-
CLI's own update command when T3 Code cannot tell. Update a CLI installed with
209-
mise through mise. Cursor and Antigravity update with T3 Code. Homebrew and
210-
Chocolatey installs compare against the version their package manager offers,
211-
which can trail the npm release; update Claude installed with Chocolatey
212-
through Chocolatey.
207+
(Homebrew, mise, or a global npm, pnpm, Yarn, Bun, Volta, or Vite+ install), or
208+
the CLI's own update command when T3 Code cannot tell. T3 Code runs `mise upgrade`
209+
only for a tool your mise config requests as `latest` when the provider's binary
210+
path is a mise shim or under the tool's `installs/<tool>/latest` link; update a
211+
pinned version, or a path into one version's directory, through mise yourself.
212+
Cursor and Antigravity update with T3 Code. Homebrew and Chocolatey installs
213+
compare against the version their package manager offers, which can trail the
214+
npm release; update Claude installed with Chocolatey through Chocolatey.
213215

214216
Add another provider instance for a separate account or configuration. Each
215217
instance can have its own environment variables, such as API keys or a custom

0 commit comments

Comments
 (0)