+36
![github-actions[bot]](/assets/img/avatar_default.png)








Julius Marminge
maria-rcks
Bilal Bakr
shivam
Vitalii Yehorov
Jake Leventhal
Claude Opus 5
Alex Southwell
github-actions[bot]
Nicholas Wasmiller
PB
Exotic
Yash Singh
Devin
Theo Browne
Gabriel De Andrade
Dara Adedeji
scratchyone
Dominic Roy
chukfinley
Primož Ajdišek
benthecarman
NaveDanan
aaditagrawal
Aditya Garud
Nick Anisimov
MacKinley Smith
Yordis Prieto
t3-code[bot]
AKolenda
Guillermo Casanova
Otavio Salvador
Shirish Pothi
Ishaan Kothari
Bob Fowler
Anton Bezdenezhnykh
ValeraZSD
Ephraim
Ryan Ilano
Alex
maco
Cursor
Tristan Knight
PR Batch Tester
oliver
kamkm
de34391427
Co-authored-by: maria-rcks <[email protected]> Co-authored-by: Bilal Bakr <[email protected]> Co-authored-by: shivam <[email protected]> Co-authored-by: Vitalii Yehorov <[email protected]> Co-authored-by: Jake Leventhal <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Alex Southwell <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nicholas Wasmiller <[email protected]> Co-authored-by: PB <[email protected]> Co-authored-by: Exotic <[email protected]> Co-authored-by: Yash Singh <[email protected]> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Theo Browne <[email protected]> Co-authored-by: Gabriel De Andrade <[email protected]> Co-authored-by: Dara Adedeji <[email protected]> Co-authored-by: scratchyone <[email protected]> Co-authored-by: Dominic Roy <[email protected]> Co-authored-by: chukfinley <[email protected]> Co-authored-by: Primož Ajdišek <[email protected]> Co-authored-by: benthecarman <[email protected]> Co-authored-by: NaveDanan <[email protected]> Co-authored-by: aaditagrawal <[email protected]> Co-authored-by: Aditya Garud <[email protected]> Co-authored-by: Nick Anisimov <[email protected]> Co-authored-by: MacKinley Smith <[email protected]> Co-authored-by: Yordis Prieto <[email protected]> Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: AKolenda <[email protected]> Co-authored-by: Guillermo Casanova <[email protected]> Co-authored-by: Otavio Salvador <[email protected]> Co-authored-by: Shirish Pothi <[email protected]> Co-authored-by: Ishaan Kothari <[email protected]> Co-authored-by: Bob Fowler <[email protected]> Co-authored-by: Anton Bezdenezhnykh <[email protected]> Co-authored-by: ValeraZSD <[email protected]> Co-authored-by: Ephraim <[email protected]> Co-authored-by: Ryan Ilano <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: maco <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Tristan Knight <[email protected]> Co-authored-by: PR Batch Tester <[email protected]> Co-authored-by: oliver <[email protected]> Co-authored-by: kamkm <[email protected]> Signed-off-by: Yordis Prieto <[email protected]>
67 lines
3.1 KiB
Markdown
67 lines
3.1 KiB
Markdown
# OpenCode
|
|
|
|
Install and authenticate OpenCode on the machine running your environment, then
|
|
enable it in **Settings > Providers**. See [provider setup](./install.md#providers).
|
|
T3 Code requires OpenCode 1.14.19 or newer, including when you connect an existing
|
|
OpenCode server.
|
|
|
|
## OpenCode 2
|
|
|
|
T3 Code supports OpenCode 2.0.18 and newer. It detects the version on its own, so
|
|
the same provider settings work for OpenCode 1.x and 2.x. OpenCode 1.x shows
|
|
**Limited support** in its provider settings.
|
|
|
|
OpenCode 2 is a separate package, `@opencode/cli`. To move from 1.x, install it
|
|
yourself, for example `npm install -g @opencode/cli`. Then refresh provider status.
|
|
T3 Code's update button updates whichever package you have installed. It never
|
|
switches a 1.x install to 2.x.
|
|
|
|
OpenCode 2 converts the shared OpenCode database to its own format the first time it
|
|
runs. Don't run OpenCode 1.x and 2.x side by side on the same machine. Threads you
|
|
started on 1.x continue on 2.x.
|
|
|
|
Plan mode uses OpenCode's `plan` agent.
|
|
|
|
## Local or external server
|
|
|
|
Leave **Server URL** empty to let T3 Code start OpenCode locally. A password in
|
|
provider settings applies to both that server and T3 Code's connection. With no
|
|
password setting, the local server uses `OPENCODE_SERVER_PASSWORD` from its
|
|
environment.
|
|
|
|
To use an existing OpenCode server, set **Server URL** and its password in provider
|
|
settings. T3 Code uses only that configured password for an external server; it
|
|
does not forward a local `OPENCODE_SERVER_PASSWORD`. If connection or version checks
|
|
fail, check the URL, credentials, and OpenCode version, then refresh provider status.
|
|
|
|
After a lost connection, send another prompt to reconnect to the same OpenCode
|
|
session.
|
|
|
|
## Approvals
|
|
|
|
OpenCode follows the shared [permission modes](./permission-modes.md). **Auto** has
|
|
the same rules as **Supervised** because OpenCode has no AI approval reviewer.
|
|
Environment files such as `.env` and `.env.local` need approval in restricted
|
|
modes even though normal file reads do not; `.env.example` is allowed.
|
|
|
|
**Allow for workspace** applies to matching requests in other OpenCode sessions
|
|
using the same workspace. It is broader than the current thread, especially on a
|
|
shared external server. Use **Allow once** for a single request. Denying an action
|
|
does not stop the whole turn.
|
|
|
|
## Refresh models, commands, and skills
|
|
|
|
After changing an OpenCode login or configuration, use **Refresh provider status**
|
|
in **Settings > Providers** for that environment. On mobile, use **Refresh models**
|
|
in the thread settings. Reconnecting also refreshes the catalog; periodic provider
|
|
health checks do not.
|
|
|
|
Credential changes are read on refresh. Native OpenCode configuration can remain
|
|
cached while the local helper is running. Let it sit for 30 seconds without model
|
|
refreshes or text-generation work, then refresh again to reload the files. Repeated
|
|
refreshes keep the helper alive. An external server may need its own reload or
|
|
restart before T3 Code can see configuration changes.
|
|
|
|
Existing threads keep their selected model and options even when it disappears
|
|
from the catalog. If OpenCode rejects that model, select an available one and retry.
|