@devries-cameron20 / t3code-1 / commits / ede41dfe79
Fork 0

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

fix(opencode): OpenCode installs T3 can't identify no longer get an Update button that hangs (#28278)

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

Victor Vogel committed Nov 1, 2026 at 16:01 UTC ede41dfe79190e2b3381cd74291bd95873af2df9
2 files changed +17 -1
packages/provider-opencode/src/server/driver.test.ts
+16 -1
@@ -462,7 +462,7 @@ const resolveUpdate = (generation: "v1" | "v2", binaryPath: string) =>
462 );
463
464 it.effect.skipIf(HostProcess.Platform.defaultValue() === "win32")(
465 - "updates an npm-global OpenCode 2 install as @opencode/cli and a 1.x one as opencode-ai",
465 + "updates npm-global OpenCode by generation and runs upgrade only for its own installer's path",
466 () =>
467 Effect.gen(function* () {
468 const root = NodeFS.realpathSync(
@@ -493,6 +493,21 @@ it.effect.skipIf(HostProcess.Platform.defaultValue() === "win32")(
493 assert.isNull(
494 (yield* resolveUpdate("v1", NodePath.join(v2Prefix, "bin", "opencode"))).update,
495 );
496 + const executable = (...segments: ReadonlyArray<string>) => {
497 + const path = NodePath.join(root, ...segments);
498 + NodeFS.mkdirSync(NodePath.dirname(path), { recursive: true });
499 + NodeFS.writeFileSync(path, "#!/bin/sh\n");
500 + NodeFS.chmodSync(path, 0o755);
501 + return path;
502 + };
503 + const launcher = executable("launcher", "opencode");
504 + const native = executable(".opencode", "bin", "opencode");
505 + for (const generation of ["v1", "v2"] as const) {
506 + assert.isNull((yield* resolveUpdate(generation, launcher)).update);
507 + assert.deepStrictEqual((yield* resolveUpdate(generation, native)).update?.args, [
508 + "upgrade",
509 + ]);
510 + }
511 }),
512 );
513
packages/provider-opencode/src/server/driver.ts
+1
@@ -83,6 +83,7 @@ export const openCodeUpdateFor = (generation: ProbedOpenCode["generation"]) =>
83 nativeUpdate: {
84 args: ["upgrade"],
85 isCommandPath: isOpenCodeNativeCommandPath,
86 + requiresCommandPath: true,
87 },
88 });
89