Repository navigation
[Bug]: Desktop stuck on "Connecting to WSL" after update due to renumbered migrations 63-65 (MigrationError) #21936
Description
Before submitting
- I searched existing issues and did not find a duplicate. (Related: [Bug]: Updates from official 0.0.46-preview.2909 fail: migration 61 renumbered (PeerLinks → PullRequestReviewGuides), no upgrade path #21284 for migration renumbering on server; [Bug]: "Connecting to WSL" infinite loading #5967, [Bug]: WSL backend stuck connecting when Windows can't reach the WSL NAT IP #13738 for desktop WSL connection splash).
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Install and run
T3-Code-0.1.1-preview.20261017.3254-x64.exewith WSL integration enabled.
This applies migrations up to 65 in~/.t3/userdata/statev2.sqlite(63: PeerLinks,64: PeerLinkFence,65: WaitingLinkRequestIndex). - Update/upgrade to
T3-Code-0.1.1-nightly.20261019.3373-x64.exe(WSL runtimesha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866). - Launch T3 Code and connect to WSL.
Expected behavior
The WSL backend process starts up, runs any pending migrations or reconciles renumbered migrations, marks the runtime ready, and connects to the desktop app.
Actual behavior
The desktop UI gets stuck on the "Connecting to WSL" loading screen indefinitely.
Under the hood, the WSL backend child process crashes immediately on launch with exit code 1 because the migrations between the preview build and the nightly build were renumbered/replaced:
- In
0.1.1-preview.20261017.3254: ID 63 wasPeerLinks, ID 64 wasPeerLinkFence, ID 65 wasWaitingLinkRequestIndex. - In
0.1.1-nightly.20261019.3373: ID 63 isDropUnusedV1Projections, ID 64 isCanonicalizeThreadPullRequestLinks.
Because ID 65 was already recorded, assertV2MigrationsCanRun aborts with MigrationError. The desktop app continuously retries spawning the backend, resulting in an infinite loading loop.
Impact
Blocks work completely
Version or commit
- Upgraded from:
T3-Code-0.1.1-preview.20261017.3254 - Upgraded to:
T3-Code-0.1.1-nightly.20261019.3373 - WSL Runtime:
sha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866
Environment
Windows 11, WSL2 (Ubuntu), T3 Code Desktop 0.1.1-nightly.20261019.3373
Logs or stack traces
From %USERPROFILE%\.t3\userdata\logs\server-child.log:
{"message":"backend child process failure output start","level":"ERROR","timestamp":"2026-10-19T21:10:10.471Z","annotations":{"component":"desktop-backend-child","runId":"f6a6d11d3856","instanceId":"primary","phase":"START","details":"pid=8020 port=3774 cwd=C:\\Users\\Hamza"},"spans":{},"fiberId":"#backend-child"}
{"message":"backend child process output","level":"INFO","timestamp":"2026-10-19T21:10:10.472Z","annotations":{"component":"desktop-backend-child","runId":"f6a6d11d3856","instanceId":"primary","stream":"stdout","text":"[02:40:10.433] ERROR (#1): MigrationError: This database's migration history would skip required schema migrations: 63_DropUnusedV1Projections (recorded: PeerLinks), 64_CanonicalizeThreadPullRequestLinks (recorded: PeerLinkFence). The migrator skips every id up to the highest recorded id (65), regardless of name. It was probably written by a different build. Start the build that wrote it, or report this migration history so an upgrade path can be added.\n at file:///home/hamza/.t3/wsl-runtime/sha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866/t3:116153:17\n at assertV2MigrationsCanRun (file:///home/hamza/.t3/wsl-runtime/sha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866/t3:116162:26)\n at assertV2MigrationsCanRun (definition) (file:///home/hamza/.t3/wsl-runtime/sha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866/t3:116138:29)\n at runMigrations (file:///home/hamza/.t3/wsl-runtime/sha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866/t3:116243:10)\n at runMigrations (definition) (file:///home/hamza/.t3/wsl-runtime/sha256-3ab3de9154fd1724be4800fa01d3df0906ffa35fa3e7a7ed1c4d7110b9c7a866/t3:116159:18)"},"spans":{},"fiberId":"#backend-child"}
{"message":"backend child process failure output end","level":"ERROR","timestamp":"2026-10-19T21:10:10.473Z","annotations":{"component":"desktop-backend-child","runId":"f6a6d11d3856","instanceId":"primary","phase":"END","details":"pid=8020 code=1"},"spans":{},"fiberId":"#backend-child"}Recorded migration history before manual intervention in ~/.t3/userdata/statev2.sqlite:
SELECT migration_id, name FROM effect_sql_migrations ORDER BY migration_id DESC LIMIT 5;
-- 65 | WaitingLinkRequestIndex
-- 64 | PeerLinkFence
-- 63 | PeerLinks
-- 62 | ThreadFailureLookupIndex
-- 61 | PullRequestReviewGuidesWorkaround
Close T3 Code and delete conflicting migration rows >= 63 from effect_sql_migrations in both ~/.t3/userdata/statev2.sqlite (WSL side) and %USERPROFILE%\.t3\userdata\statev2.sqlite (Windows side):
sqlite3 ~/.t3/userdata/statev2.sqlite "DELETE FROM effect_sql_migrations WHERE migration_id >= 63;"
sqlite3 /mnt/c/Users/<user>/.t3/userdata/statev2.sqlite "DELETE FROM effect_sql_migrations WHERE migration_id >= 63;"Once the recorded migration ceiling is reset to 62 (ThreadFailureLookupIndex), restarting T3 Code successfully applies 063_DropUnusedV1Projections and 064_CanonicalizeThreadPullRequestLinks, and the WSL backend connects normally.
Activity
juliusmarminge commentedon Oct 19, 2026
Note
Grok responding on behalf of Julius.
Thanks for the log, it shows exactly what happened.
That preview build carries peer link migrations at 63 to 65 that aren't on main. Main uses 63 and 64 for other migrations and has no peer link migrations at all (
apps/server/src/persistence/Migrations.ts:73-77). Because the migrator skips every id up to the highest one already recorded, the server refuses to start rather than silently skip two required migrations (Migrations.ts:158-189). That refusal is intended, since it protects your data. The only automatic repair today covers an older preview numbering (apps/server/src/persistence/reconcileV2PreviewMigration.ts:10-56).Moving a database from a preview build back to nightly isn't a supported path while the preview has migrations main doesn't. For now, going back to the preview build that wrote the database starts it again, as the error message suggests.
Closing this as not planned.