You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Relinking a revoked T3 Connect environment to a different account fails with "already linked to a different cloud account" #34193
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Link an environment to T3 Connect with cloud account A.
Remove that environment from account A in T3 Connect. The server's next relay request gets a 401 and it marks the link revoked (cloud-link-revoked), keeping the old link secrets.
Sign in to a different cloud account B in the desktop or web app and link the same environment from the T3 Connect UI.
Expected behavior
The revoked link no longer ties the environment to account A, so linking it to account B succeeds.
Actual behavior
Linking fails with:
Could not configure environment relay access: This environment is already linked to a different cloud account. Unlink it before switching accounts.
Impact
Major degradation or frequent failure
Version or commit
0.1.9-nightly.20261111.4501; still reproduces on main @ 034f3ba
Environment
macOS (arm64), desktop app
Root cause
markLinkRevoked in apps/server/src/cloud/CloudLink.ts only sets cloud-link-revoked and keeps cloud-linked-user-id, the relay credential, mint key, and endpoint runtime config (on purpose: clock skew can cause false 401s). applyCloudRelayConfig then calls validateLinkedCloudUser, which compares the new account against the stale cloud-linked-user-id without looking at the revoked mark, so it fails with CloudLinkAccountMismatchError.
CliState.dropRevokedCloudLink clears exactly this stale state, but only t3 connect link (linkEnvironmentForConnect) calls it. The UI path (applyRelayConfig) and the managed-link/startup reconcile path never do.
Related: #21857 (same guard, but there the old link is still active).
Workaround
On the server machine, run t3 connect link. It drops the revoked link first ("Replacing the link T3 Connect revoked.") and then links to the signed-in account.
Activity