Skip to content

On Windows, an update from the app leaves the t3 command on the old version #45698

Done

Description

@Aizistral

What happened

We updated the T3 Code background service on a Windows host from 0.1.12 to 0.1.13 from the app. The server came up on 0.1.13, but the t3 command kept running 0.1.12. Every command that opens the database then warned:

WARN: Database migration history diverges from this build; recorded migration ids are skipped, not reconciled by name. {
  divergent: [
    '118:WorkflowPools (unknown to this build)',
    '119:WorkflowRunSubject (unknown to this build)'
  ]
}

This is #14609 on Windows. #14875 fixed it for Linux and macOS and says "Windows shim behavior is unchanged".

Diagnosis

On Windows, the standalone installer writes the t3 command as a shim, %USERPROFILE%\.local\bin\t3.cmd:

@echo off
"%USERPROFILE%\.t3\runtime\versions\<version>\t3.exe" %*

It also records the shim's path in %USERPROFILE%\.t3\runtime\launchers.

An update from the app goes through the service launcher. After the launcher commits it, the new server's prepareTrial calls repointLaunchers in apps/server/src/cloud/serviceLauncherClient.ts. That function returns at once on any platform other than Linux and macOS:

if (platform !== "linux" && platform !== "darwin") return;

This is line 163 at v0.1.13, and unchanged on main at 58a4e599. So the shim keeps naming the old runtime.

t3 update on the same machine does handle Windows: repointLauncher in apps/server/src/cli/update.ts finds the shim through findWindowsShim, which looks in T3CODE_INSTALL_BIN_DIR, on PATH and in the runtime\launchers record, and rewrites it. The update from the app never reaches that code.

What the stale command does: it runs the old CLI against a database the new server has already migrated, which gives the warning above. The comments on #14609 list worse effects of a stale t3, such as pairing links the server rejects.

Steps to reproduce

  1. On Windows, install 0.1.12 with the standalone installer and run it as the background service:
    $env:T3CODE_VERSION = "0.1.12"; irm https://t3.codes/install.ps1 | iex
    t3 service install
  2. Update the server to 0.1.13 from the app.
  3. Run t3 --version. It prints t3 v0.1.12, while the server reports 0.1.13. type %USERPROFILE%\.local\bin\t3.cmd still names versions\0.1.12\t3.exe, and t3 environment list prints the warning above.

We reproduced this on a second Windows machine with a separate T3 home (T3CODE_HOME, T3CODE_INSTALL_BIN_DIR). For the update, a script sent the same server.updateServer request the app sends, over the WebSocket API, with a session from t3 auth session issue --scope environment:maintain.

Version

0.1.13 (updated from 0.1.12). The code cited is unchanged on main at 58a4e599.

Environment

Windows 11 and Windows 10 22H2 (build 19045), x64. Standalone installer, background service from t3 service install (a scheduled task). Updated from the app (boot-service.log: "Server update prepared; handing off to the service launcher."), and in the reproduction through server.updateServer directly.

Evidence

From the reproduction, after the update:

service-state.json   {"protocol":4,"activeVersion":"0.1.13","update":{"fromVersion":"0.1.12","targetVersion":"0.1.13","status":"committed"}}
server               serverVersion 0.1.13 (/.well-known/t3/environment)
scheduled task       ...\runtime\versions\0.1.13\t3.exe __service-launcher ...
t3.cmd               "...\runtime\versions\0.1.12\t3.exe" %*
runtime\launchers    ...\bin\t3.cmd
t3 --version         t3 v0.1.12
boot-service.log     INFO: Server update prepared; handing off to the service launcher.
server.trace.ndjson  cloud.service_launcher_client.repoint_launchers: 0.64 ms, exit Success

The repoint_launchers span runs and succeeds in under a millisecond: it returns at the platform check.

Related issues

Fix applied or workaround

Rewriting t3.cmd to name the active runtime's t3.exe fixes it until the next update from the app. A fix is in #45700.

Filed by

Claude Opus 5.5 and Claude Fable 5.2 (Claude Code, in T3 Code), following the triage playbook. Not started with t3 triage.

Activity

  1. added
    via-triage
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions