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 to resume supported active threads after an update, crash, or machine
15restart. Changes are saved to connected environments that support this setting;
16update older servers first. If a supported environment was offline or has a
17different value, use **Apply to all** in Settings after it connects.
18T3 Code must start again on that machine;
19the setting does not enable automatic startup. Terminal commands may still be
20interrupted, and threads without saved provider resume state need a new message.
21If you previously enabled continuation for updates, enable this setting once
22to allow recovery without a connected client.
23
24Updates from the previous orchestration system preserve conversation transcripts but cannot carry
25every kind of runtime history forward. Read [Threads from older T3 Code versions](./thread-migration.md)
26before continuing an important older thread.
27
28## When versions don't match
29
30A client and server must speak the same orchestration protocol. If they do not, the connection is
31refused rather than running half-upgraded:
32
33- An app newer than the server is blocked before connecting, with a notice telling you to update
34 T3 Code on the machine named in the notice.
35- A server newer than your app refuses the connection with an update message.
36
37Update the side the notice names, then reconnect.
38
39## Update a connected server
40
41The offered action depends on how the server runs:
42
43| Action | What to do |
44| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
45| **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. |
46| **Update the desktop app** | Update the desktop app on the machine running the server, then reopen it if needed. |
47| **Copy update command** | Run the command on the named host to update the detected global npm install, then restart the server with your usual options. |
48| **Copy relaunch command** | Stop the command-line server on its host and relaunch with the copied command, keeping your usual subcommand and options. This does not update an installed `t3` command. |
49
50On the host, run:
51
52```sh
53t3 update <client-version>
54```
55
56Replace `<client-version>` with the version shown in the notice. The command
57asks before restarting the background service; if you decline, run
58`t3 service restart` when you are ready. For a server you started by hand,
59stop it and start it again afterwards with your usual options such as `--host`
60or `--tailscale-serve`.
61
62If you run the server with `npx` rather than an installed `t3`, there is
63nothing to update on the host: stop the server and relaunch it as
64`npx t3@<client-version>` with the same subcommand and options.
65
66## If an update fails
67
68Keep the client open until it reconnects or reports a failure. A failed service
69update can roll back to the previous version. If the update still fails:
70
711. Retry the offered action once.
722. Check that you updated the server's machine, not only the device you are using.
733. For a command-line server, stop it and relaunch the exact version shown in the notice.
74
75## Update providers
76
77**Settings → Providers** shows provider updates for the selected environment.
78**Update all** updates every outdated provider on every connected environment
79at once. Hover it to see which providers it will update. Providers that only
80offer a manual update command are not included.
81
82## Mobile updates
83
84To update an environment from your phone, open **Settings → Environments** and
85select it. **Check for updates** finds the latest release on that environment's
86current release channel. Keep the app open while the environment updates and
87reconnects. Hosts that cannot update remotely show instructions for updating on
88the machine instead.
89
90The same page lets you refresh provider status and update supported providers.
91These controls require a connected environment and permission to operate it.
92Provider update checks and restart continuation preferences are in
93**Settings → Maintenance**. If provider update checks are disabled, enable them
94there before refreshing to find newer versions.
95
96Install App Store or Google Play releases as usual. The mobile app can also
97download updates in the background and apply them when you next leave the app.
98It saves drafts and queued messages before restarting. If you keep the app open
99for a long time, it may ask to install immediately; choosing **Later** leaves the
100update queued for the next suitable moment.