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

updating.md

150 lines8.2 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 monitor, subagent, or background task
53is woken and told that this work stopped. A background shell, such as a dev server,
54does not wake it; the thread learns about it with your next message.
55A thread is not resumed while it waits for your approval, answer, or secret, or
56while it is archived, snoozed, or settled. After three automatic resumes in a row,
57the thread waits for your next message.
58​
59Updates from the previous orchestration system preserve conversation transcripts but cannot carry
60every kind of runtime history forward. Read [Threads from older T3 Code versions](./thread-migration.md)
61before continuing an important older thread.
62​
63## When versions don't match
64​
65A client and server must speak the same orchestration protocol. If they do not, the connection is
66refused rather than running half-upgraded:
67​
68- An app newer than the server is blocked before connecting, with a notice telling you to update
69 T3 Code on the machine named in the notice.
70- A server newer than your app refuses the connection with an update message.
71​
72Update the side the notice names, then reconnect.
73​
74## Update a connected server
75​
76The offered action depends on how the server runs:
77​
78| Action | What to do |
79| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80| **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. |
81| **Update the desktop app** | Update the desktop app on the machine running the server, then reopen it if needed. |
82| **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. |
83| **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. |
84​
85On the host, run:
86​
87```sh
88t3 update <client-version>
89```
90​
91Replace `<client-version>` with the version shown in the notice. The command
92asks before restarting the background service; if you decline, run
93`t3 service restart` when you are ready. For a server you started by hand,
94stop it and start it again afterwards with your usual options such as `--host`
95or `--tailscale-serve`.
96​
97If you run the server with `npx` rather than an installed `t3`, there is
98nothing to update on the host: stop the server and relaunch it as
99`npx t3@<client-version>` with the same subcommand and options.
100​
101## If an update fails
102​
103Keep the client open until it reconnects or reports a failure. A failed service
104update can roll back to the previous version. If the update still fails:
105​
1061. Retry the offered action once.
1072. Check that you updated the server's machine, not only the device you are using.
1083. For a command-line server, stop it and relaunch the exact version shown in the notice.
109​
110Only one server can use a T3 home directory at a time. If startup reports that
111another server owns it, stop that server before retrying, or use a separate home
112directory and pair with the running server.
113​
114## Update providers
115​
116**Settings → Providers** shows provider updates for the selected environment.
117**Update all** updates every outdated provider on every connected environment
118at once. Hover it to see which providers it will update. Providers that only
119offer a manual update command are not included.
120​
121After a successful provider CLI update, T3 Code refreshes model discovery for
122every enabled instance of that provider using its own configuration. Connected
123clients receive the refreshed catalogs automatically. Provider update checks
124must be enabled to download the latest T3 Code model catalog.
125​
126Provider updates do not restart running chats. An existing session can keep
127using the previous CLI until it ends. If discovery fails, check the provider
128status and refresh it again.
129​
130## Mobile updates
131​
132To update an environment from your phone, open **Settings → Environments** and
133select it. **Check for updates** finds the latest release on that environment's
134current release channel. Keep the app open while the environment updates and
135reconnects. Hosts that cannot update remotely show instructions for updating on
136the machine instead.
137​
138The same page lets you refresh provider status and update supported providers.
139These controls require a connected environment and permission to operate it.
140Provider update checks and restart continuation preferences are in
141**Settings → Maintenance**. If provider update checks are disabled, enable them
142there before refreshing to find newer versions. The same setting controls whether
143T3 Code downloads model catalog updates, so with it off new models may not appear
144until you enable it and refresh provider status.
145​
146Install App Store or Google Play releases as usual. The mobile app can also
147download updates in the background and apply them when you next leave the app.
148It saves drafts and queued messages before restarting. If you keep the app open
149for a long time, it may ask to install immediately; choosing **Later** leaves the
150update queued for the next suitable moment.