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

updating.md

151 lines8.3 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## Update everything at once
9​
10The update button at the bottom of the sidebar updates every connected machine
11in one step. It updates outdated providers, then servers that are behind, then
12the desktop app you are using. Servers move to the
13version your desktop app is installing, or to your web app's version. A
14background service stays on its current release channel. A remote desktop app
15installs the latest release from its own channel. Hover the button to see what
16it will update.
17​
18While it runs, the button widens to show progress. It names a machine that is
19taking longer than usual, and offers **Retry** for a server that failed. Click
20it to see every machine. The desktop app restarts once each server has started
21its own restart, after a short countdown. Choose **Later** to keep working and
22restart from the update button when you are ready. A server still restarting
23finishes on its own, and the button keeps showing it after the desktop app
24restarts.
25​
26Server updates appear only after that version is published to npm. Remote
27desktop apps do not wait for npm. The confirmation lists each machine it skips
28and why, such as a machine that is offline or needs a manual update. Use the
29notice or **Settings → Connections** for those.
30​
31If a desktop app restarts on its old version, T3 Code tells you the update did
32not apply. It does not install that version again on its own, even when another
33device asks. Use the update button on that machine to retry.
34​
35The confirmation counts the running threads that the restarts will interrupt,
36and how many can resume afterwards. See **Continue threads after restarts**
37below.
38​
39## Before you update
40​
41Server updates restart the connection and can interrupt active agents and
42terminal commands. Saved threads, settings, and project files remain.
43​
44**Settings → General → Continue threads after restarts** is on by default.
45It resumes supported active threads after an update, crash, or machine
46restart. Changes are saved to connected environments that support this setting;
47update older servers first. If a supported environment was offline or has a
48different value, use **Apply to all** in Settings after it connects.
49T3 Code must start again on that machine;
50the setting does not enable automatic startup. Terminal commands may still be
51interrupted, and threads without saved provider resume state need a new message.
52A thread that finished its turn to wait on a subagent, a background task, or a
53command or monitor the agent said it was waiting on is woken and told that this work
54stopped. Other background shells and monitors, such as a dev server and its
55watchdog, do not wake it; the thread learns about them with your next message.
56A thread is not resumed while it waits for your approval, answer, or secret, or
57while it is archived, snoozed, or settled. After three automatic resumes in a row,
58the thread waits for your next message.
59​
60Updates from the previous orchestration system preserve conversation transcripts but cannot carry
61every kind of runtime history forward. Read [Threads from older T3 Code versions](./thread-migration.md)
62before continuing an important older thread.
63​
64## When versions don't match
65​
66A client and server must speak the same orchestration protocol. If they do not, the connection is
67refused rather than running half-upgraded:
68​
69- An app newer than the server is blocked before connecting, with a notice telling you to update
70 T3 Code on the machine named in the notice.
71- A server newer than your app refuses the connection with an update message.
72​
73Update the side the notice names, then reconnect.
74​
75## Update a connected server
76​
77The offered action depends on how the server runs:
78​
79| Action | What to do |
80| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81| **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. |
82| **Update the desktop app** | Update the desktop app on the machine running the server, then reopen it if needed. |
83| **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. |
84| **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. |
85​
86On the host, run:
87​
88```sh
89t3 update <client-version>
90```
91​
92Replace `<client-version>` with the version shown in the notice. The command
93asks before restarting the background service; if you decline, run
94`t3 service restart` when you are ready. For a server you started by hand,
95stop it and start it again afterwards with your usual options such as `--host`
96or `--tailscale-serve`.
97​
98If you run the server with `npx` rather than an installed `t3`, there is
99nothing to update on the host: stop the server and relaunch it as
100`npx t3@<client-version>` with the same subcommand and options.
101​
102## If an update fails
103​
104Keep the client open until it reconnects or reports a failure. A failed service
105update can roll back to the previous version. If the update still fails:
106​
1071. Retry the offered action once.
1082. Check that you updated the server's machine, not only the device you are using.
1093. For a command-line server, stop it and relaunch the exact version shown in the notice.
110​
111Only one server can use a T3 home directory at a time. If startup reports that
112another server owns it, stop that server before retrying, or use a separate home
113directory and pair with the running server.
114​
115## Update providers
116​
117**Settings → Providers** shows provider updates for the selected environment.
118**Update all** updates every outdated provider on every connected environment
119at once. Hover it to see which providers it will update. Providers that only
120offer a manual update command are not included.
121​
122After a successful provider CLI update, T3 Code refreshes model discovery for
123every enabled instance of that provider using its own configuration. Connected
124clients receive the refreshed catalogs automatically. Provider update checks
125must be enabled to download the latest T3 Code model catalog.
126​
127Provider updates do not restart running chats. An existing session can keep
128using the previous CLI until it ends. If discovery fails, check the provider
129status and refresh it again.
130​
131## Mobile updates
132​
133To update an environment from your phone, open **Settings → Environments** and
134select it. **Check for updates** finds the latest release on that environment's
135current release channel. Keep the app open while the environment updates and
136reconnects. Hosts that cannot update remotely show instructions for updating on
137the machine instead.
138​
139The same page lets you refresh provider status and update supported providers.
140These controls require a connected environment and permission to operate it.
141Provider update checks and restart continuation preferences are in
142**Settings → Maintenance**. If provider update checks are disabled, enable them
143there before refreshing to find newer versions. The same setting controls whether
144T3 Code downloads model catalog updates, so with it off new models may not appear
145until you enable it and refresh provider status.
146​
147Install App Store or Google Play releases as usual. The mobile app can also
148download updates in the background and apply them when you next leave the app.
149It saves drafts and queued messages before restarting. If you keep the app open
150for a long time, it may ask to install immediately; choosing **Later** leaves the
151update queued for the next suitable moment.