Open History to see the last commit
1# Updating T3 Code
2
3The app you use and the server running your agents can be on different machines.
4When a server is behind your web or desktop app, an update notice appears in the
5conversation and **Settings → Connections**. Update the machine named in that
6notice.
7
8## Before you update
9
10Server updates restart the connection and can interrupt active agents and
11terminal commands. Saved threads, settings, and project files remain.
12
13**Settings → General → Continue threads after restarts** is off by default.
14Enable it for each environment to resume supported active threads after an
15update, crash, or machine restart. T3 Code must start again on that machine;
16the setting does not enable automatic startup. Terminal commands may still be
17interrupted, and threads without saved provider resume state need a new message.
18If you previously enabled continuation for updates, enable this environment
19setting once to allow recovery without a connected client.
20
21## Update a connected server
22
23The offered action depends on how the server runs:
24
25| Action | What to do |
26| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27| **Update server** | Keep the client open while it installs and reconnects. Supported background services update remotely. For a desktop-hosted server, this also closes and relaunches the desktop app on the host. |
28| **Update the desktop app** | Update the desktop app on the machine running the server, then reopen it if needed. |
29| **Copy update command** | Stop the command-line server on its host and relaunch with the copied command, keeping your usual startup options. |
30
31For a background service, run the matching version's CLI on the host:
32
33```sh
34npx t3@<client-version> service update
35```
36
37Replace `<client-version>` with the version shown in the notice. Using
38`@latest` only resolves the mismatch if your client is on that release. An older
39service launcher may require this local update before it supports remote updates
40and rollback.
41
42For a foreground server, the copied command is `npx t3@<client-version>`. Add
43`serve` if you normally run without a browser, and preserve options such as
44`--host` or `--tailscale-serve`. See
45[background services](./background-service.md) for service management.
46
47## If an update fails
48
49Keep the client open until it reconnects or reports a failure. A failed service
50update can roll back to the previous version. If the update still fails:
51
521. Retry the offered action once.
532. Check that you updated the server's machine, not only the device you are using.
543. For a command-line server, stop it and relaunch the exact version shown in the notice.
55
56## Mobile updates
57
58Install App Store or Google Play releases as usual. The mobile app can also
59download updates in the background and apply them when you next leave the app.
60It saves drafts and queued messages before restarting. If you keep the app open
61for a long time, it may ask to install immediately; choosing **Later** leaves the
62update queued for the next suitable moment.