Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

updating.md

65 lines3.7 KB

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​
24## Update a connected server
25​
26The offered action depends on how the server runs:
27​
28| Action | What to do |
29| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30| **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. |
31| **Update the desktop app** | Update the desktop app on the machine running the server, then reopen it if needed. |
32| **Copy update command** | Stop the command-line server on its host and relaunch with the copied command, keeping your usual startup options. |
33​
34For a background service, run the matching version's CLI on the host:
35​
36```sh
37npx t3@<client-version> service update
38```
39​
40Replace `<client-version>` with the version shown in the notice. Using
41`@latest` only resolves the mismatch if your client is on that release. An older
42service launcher may require this local update before it supports remote updates
43and rollback.
44​
45For a foreground server, the copied command is `npx t3@<client-version>`. Add
46`serve` if you normally run without a browser, and preserve options such as
47`--host` or `--tailscale-serve`. See
48[background services](./background-service.md) for service management.
49​
50## If an update fails
51​
52Keep the client open until it reconnects or reports a failure. A failed service
53update can roll back to the previous version. If the update still fails:
54​
551. Retry the offered action once.
562. Check that you updated the server's machine, not only the device you are using.
573. For a command-line server, stop it and relaunch the exact version shown in the notice.
58​
59## Mobile updates
60​
61Install App Store or Google Play releases as usual. The mobile app can also
62download updates in the background and apply them when you next leave the app.
63It saves drafts and queued messages before restarting. If you keep the app open
64for a long time, it may ask to install immediately; choosing **Later** leaves the
65update queued for the next suitable moment.