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

providers-opencode.md

49 lines2.4 KB

1# OpenCode
2​
3Install and authenticate OpenCode on the machine running your environment, then
4enable it in **Settings > Providers**. See [provider setup](./install.md#providers).
5T3 Code requires OpenCode 1.14.19 or newer, including when you connect an existing
6OpenCode server.
7​
8## Local or external server
9​
10Leave **Server URL** empty to let T3 Code start OpenCode locally. A password in
11provider settings applies to both that server and T3 Code's connection. With no
12password setting, the local server uses `OPENCODE_SERVER_PASSWORD` from its
13environment.
14​
15To use an existing OpenCode server, set **Server URL** and its password in provider
16settings. T3 Code uses only that configured password for an external server; it
17does not forward a local `OPENCODE_SERVER_PASSWORD`. If connection or version checks
18fail, check the URL, credentials, and OpenCode version, then refresh provider status.
19​
20After a lost connection, send another prompt to reconnect to the same OpenCode
21session.
22​
23## Approvals
24​
25OpenCode follows the shared [permission modes](./permission-modes.md). **Auto** has
26the same rules as **Supervised** because OpenCode has no AI approval reviewer.
27Environment files such as `.env` and `.env.local` need approval in restricted
28modes even though normal file reads do not; `.env.example` is allowed.
29​
30**Allow for workspace** applies to matching requests in other OpenCode sessions
31using the same workspace. It is broader than the current thread, especially on a
32shared external server. Use **Allow once** for a single request. Denying an action
33does not stop the whole turn.
34​
35## Refresh models, commands, and skills
36​
37After changing an OpenCode login or configuration, use **Refresh provider status**
38in **Settings > Providers** for that environment. On mobile, use **Refresh models**
39in the thread settings. Reconnecting also refreshes the catalog; periodic provider
40health checks do not.
41​
42Credential changes are read on refresh. Native OpenCode configuration can remain
43cached while the local helper is running. Let it sit for 30 seconds without model
44refreshes or text-generation work, then refresh again to reload the files. Repeated
45refreshes keep the helper alive. An external server may need its own reload or
46restart before T3 Code can see configuration changes.
47​
48Existing threads keep their selected model and options even when it disappears
49from the catalog. If OpenCode rejects that model, select an available one and retry.