[Bug]: Removing an environment on the T3 Connect account page leaves it linked and holding a tunnel slot; the relay DELETE removes it #38179
Before submitting#
- I searched existing issues and did not find a duplicate. Related but different: #36396 (Deregister shows an error while the row disappears), #25179 (relay unlink fails with
upstream_unavailable), #28213 (stale local card after a reinstall). Here the removal on the account page did not take effect at all, while the same relay call made directly removed the environment at once. - I included enough detail to reproduce or investigate the problem.
Area#
apps/web
Steps to reproduce#
- On macOS, install T3 Code Nightly (desktop) with Local environment on and sign in to a free T3 Connect account. The app's local server links itself to the account as an environment (labelled with the Mac's name) and takes one of the 3 tunnel slots.
- Turn the Mac into a thin client: turn Local environment off and run
t3 connect logoutfrom the app's bundled CLI. The CLI warns:The relay-side environment record was not revoked.t3 connect statusthen showsAuthorization: missingandEnvironment link: not provisioned, and nocloudflaredruns. - Open the T3 Connect page of the account at accounts.t3.codes and remove the Mac's environment.
- List the account's environments:
GET https://relay.t3.codes/v1/environmentswith the bearer token of a signed-int3CLI on another machine.
Expected behavior#
After step 3 the Mac's environment is gone from the account, and its tunnel slot is free.
Actual behavior#
After step 3 the Mac's environment is still returned by GET /v1/environments, with its original linkedAt and its managed endpoint, and it keeps using 1 of the 3 tunnel slots. Its endpoint answers HTTP 530 with Cloudflare error code: 1033, because the tunnel behind it is gone.
DELETE https://relay.t3.codes/v1/client/environment-links/<environmentId> with the same CLI token removed it immediately. It was not listed again after the desktop app on the Mac was quit and reopened, and it was still absent 15 minutes later.
We did not capture the toast or the network request from the account page, so I can't say whether the page showed an error, removed the row optimistically, or sent a different request.
Impact#
Minor bug or occasional failure
Version or commit#
Desktop app 0.1.11-nightly.20261117.4825 (Mac). Other environments on the account run 0.1.10-nightly.20261116.4800.
Environment#
macOS on Apple Silicon (darwin-arm64), T3 Code Nightly desktop app, managed cloudflared 2026.10.4.
Logs or stack traces#
# Mac, after `t3 connect logout`
$ t3 connect status --base-dir ~/.t3
T3 Connect
Exposure: disabled
Authorization: missing
Environment link: not provisioned
Relay: not provisioned
# After removing it on accounts.t3.codes, GET /v1/environments still lists it (ids redacted)
{"environmentId":"<redacted>","label":"<mac name>","endpoint":{"httpBaseUrl":"https://prod-<redacted>.t3coderelay.com/","providerKind":"cloudflare_tunnel"},"linkedAt":"2026-11-17T14:18:48.834Z"}
# Its endpoint
$ curl -s -o /dev/null -w '%{http_code}\n' https://prod-<redacted>.t3coderelay.com/
530 # body: error code: 1033
# DELETE /v1/client/environment-links/<environmentId> -> success; next GET /v1/environments no longer lists it
Screenshots, recordings, or supporting files#
No response
Workaround#
Call DELETE https://relay.t3.codes/v1/client/environment-links/<environmentId> with the bearer token of a signed-in t3 CLI. Take the environmentId from GET https://relay.t3.codes/v1/environments.
tanstack-source added labelsbug
juliusmarminge added labelsneeds more info
Closing: no reply in 7 days after we asked for more information. Comment with the missing details and we will reopen.
Sign in to join this conversation.
@joaosavi Where exactly did you remove the Mac's environment: in the T3 Code app under the account menu → Manage account → T3 Connect → Deregister, or in Settings → Connections → 'Remove from this device…'? And what toast or message did you see afterwards?