@devries-cameron20 / t3code Mirror · read-only / commits / db7db4dbf6
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 08:15 UTC

fix(server): Claude no longer tries to update itself through a mise command wrapper (#27466)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

Gourav Kumar Dhiman committed Nov 2, 2026 at 03:15 UTC db7db4dbf6d3a56a706a836fa3e5c3db82ba311c
2 files changed +30 -2
packages/provider-core/src/server/maintenanceResolver.test.ts
+20
@@ -1431,6 +1431,26 @@ it.layer(
1431 env: { PATH: "" },
1432 }).pipe(Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, noSpawn));
1433 expect(mise.update).toBeNull();
1434 +
1435 + // A mise command wrapper is a symlink to the mise binary, not to the tool.
1436 + const miseBinary = NodePath.join(tempDir, "usr", "bin", "mise");
1437 + writeExecutable(miseBinary);
1438 + const wrapper = NodePath.join(
1439 + tempDir,
1440 + ".local",
1441 + "share",
1442 + "mise",
1443 + "command-wrappers",
1444 + "bin",
1445 + "package-tool",
1446 + );
1447 + NodeFS.mkdirSync(NodePath.dirname(wrapper), { recursive: true });
1448 + NodeFS.symlinkSync(miseBinary, wrapper);
1449 + const viaWrapper = yield* resolveProviderMaintenanceCapabilitiesEffect(selfUpdating, {
1450 + binaryPath: wrapper,
1451 + env: { PATH: "" },
1452 + }).pipe(Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, noSpawn));
1453 + expect(viaWrapper.update).toBeNull();
1454 }),
1455 );
1456
packages/provider-core/src/server/maintenanceResolver.ts
+10 -2
@@ -241,10 +241,18 @@ function isYarnGlobalCommandPath(commandPath: string): boolean {
241 return /\/yarn\/(?:data\/)?global\/node_modules\//.test(normalizeCommandPath(commandPath));
242 }
243
244 -/** Version-manager installs are pinned in its config, so updating them means editing that. */
244 +/**
245 + * Version-manager installs are pinned in its config, so updating them means editing that.
246 + * A command wrapper is a symlink to the `mise` binary, which dispatches on argv[0].
247 + */
248 function isMiseCommandPath(commandPath: string): boolean {
249 const normalized = normalizeCommandPath(commandPath);
247 - return normalized.includes("/mise/installs/") || normalized.includes("/mise/shims/");
250 + return (
251 + normalized.includes("/mise/installs/") ||
252 + normalized.includes("/mise/shims/") ||
253 + normalized.includes("/mise/command-wrappers/") ||
254 + /\/mise(?:\.exe)?$/.test(normalized)
255 + );
256 }
257
258 const winGetClaudeCommandPath =