> ## Documentation Index
> Fetch the complete documentation index at: https://ade-app.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

> Run OpenCode in DAEX as a chat or as its own CLI. It reaches 200+ model providers, local models and free models, with nothing to install.

OpenCode is an open source coding agent that can use almost any model. DAEX runs its own pinned copy of OpenCode for each machine (downloaded the first time it is needed) as a local server, with its own data folder kept apart from your personal OpenCode setup.

![The OpenCode page in DAEX Settings › Providers](https://mintcdn.com/ade-ac1c6011/X0fzcdMoI2OYgIpA/media/current/provider-opencode.jpg?fit=max\&auto=format\&n=X0fzcdMoI2OYgIpA\&q=85\&s=f8053974df940c3fb5fc23828c93e1f3)

OpenCode in Settings › Providers: its sign-in, status and models on this machine.

## Connect

Open **Settings › Providers › OpenCode** and pick the machine at the top. OpenCode works with nothing connected (free models), and you can add any of these:

| Way in | What it gives you |
| - | - |
| **Nothing** | OpenCode Zen's free models. See [Free models](https://ade-app.dev/docs/configuration/ai-providers.md#free-models). |
| **opencode.ai sign-in** | OpenCode Zen's paid models, and OpenCode Go if you subscribe. |
| **A subscription sign-in** | Subscriptions OpenCode can sign in to (for example ChatGPT, GitHub Copilot or SuperGrok). The list comes from OpenCode, so it grows over time. |
| **API keys** | A key for any provider in OpenCode's catalog (from models.dev): 200+ providers, searchable on the page. |
| **Local model servers** | LM Studio or Ollama on the machine. DAEX finds the endpoint and lists your loaded models. |
| **Custom endpoints** | Any OpenAI- or Anthropic-compatible server (name, base URL, key, model slugs), or extra `provider/model` slugs. Saved per project. |

* **DAEX Cloud.** Only the opencode.ai sign-in travels to your cloud computers (as an access-only copy that your computer keeps renewing). Other sign-ins made in OpenCode stay on the computer you made them on. For keys, save an OpenRouter key for DAEX Cloud; OpenCode and Pi both use it there.

## Chat and CLI

| Surface | How DAEX runs it | What DAEX sees |
| - | - | - |
| **Chat** | The OpenCode server, with DAEX's generated config and agents. | Typed events: turns, tool calls, subagents (background tasks), background shells, approvals, usage and cost. |
| **CLI** | The `opencode` program in a DAEX terminal. | The screen only. Turn status is read from output and quiet time. |

## Permission modes

| Chat mode | CLI mode | What it does |
| - | - | - |
| (none) | **Ask** | Asks before tool actions. |
| **Plan** | **Plan** | OpenCode's plan agent: no writes, edits, patches or shell. |
| **Edit** | **Edit** | Edits allowed; other tools still ask. |
| **Full auto** | **Allow** | Configured tools run without asking. Explicit denies in your config still apply. |
| **Config** | **Config** | DAEX passes no permission settings; your `opencode.json` decides. |

OpenCode has no **Auto** mode. See [Permissions](https://ade-app.dev/docs/configuration/permissions.md).

## Models

The picker lists every model OpenCode can reach with what you connected, plus the free ones. DAEX refreshes the models.dev catalog on launch and every six hours. OpenCode can also be the source of a [custom provider](https://ade-app.dev/docs/configuration/ai-providers.md#custom-providers), so another harness can run on a model you connected here.

## Troubleshooting

> [accordion] OpenCode won't start on macOS
>
> If Gatekeeper blocked the binary, the diagnostics say so and show the fix: clear the quarantine attribute with `xattr -d com.apple.quarantine <path>` (the card shows the full path), then re-check.

> [accordion] A provider I connected shows no models
>
> Right after a start, OpenCode loads its catalog in the background. Choose **Refresh** on the page, or refresh the models.dev catalog from the group header.

> [accordion] My own OpenCode settings don't apply
>
> DAEX's OpenCode uses its own data folder and generated config, not your `~/.local/share/opencode`. Choose **Config** mode to let your `opencode.json` decide permissions.

> [!TIP]
>
> Want Windsurf or another editor? DAEX does not run Windsurf as an agent, but a lane is a normal Git worktree, so you can open it in any editor and DAEX picks up your saved edits. A Windsurf API key does sign in [Devin](https://ade-app.dev/docs/ai-tools/devin.md).

> [card] [AI providers](https://ade-app.dev/docs/configuration/ai-providers.md)
>
> Sign-ins, API keys, custom providers and free models.

> [card] [Agents and models](https://ade-app.dev/docs/concepts/agents-and-models.md)
>
> All 13 agents, chats vs CLI sessions, and the model picker.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.