> ## 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 & Windsurf

> Run OpenCode as a managed agent provider inside ADE — and keep using Windsurf as your editor on the same worktrees.

This page covers two things: **OpenCode**, one of ADE's five agent providers, and how to keep using **Windsurf** as your editor next to ADE.

## OpenCode as a provider

[OpenCode](https://opencode.ai) is one of ADE's five agents, alongside Claude Code, Codex, Cursor, and Factory Droid. ADE runs it as a local server and routes chat and worker turns through it like any other provider. OpenCode gives you the broadest model reach — back it with a provider API key, OpenRouter, or a local model (Ollama, LM Studio, vLLM).

### Setup

**1. Open Settings → AI → OpenCode**

Turn OpenCode on. ADE downloads the binary if needed and starts the local server.

**2. Configure the backend**

| Mode | Config |
| - | - |
| **API key** | An Anthropic, OpenAI, Google, or other supported key — OpenCode calls the provider directly. |
| **OpenRouter** | An OpenRouter key for broad model access. |
| **Local** | No key — point at Ollama, LM Studio, or another local endpoint. |

**3. Pick OpenCode in chat**

OpenCode models appear in the model picker alongside the other agents. Choose one to route that session through OpenCode.

> [accordion] How ADE manages OpenCode
>
> ADE owns the full lifecycle:
>
> * **Binary manager** — downloads and verifies the OpenCode binary and checks for updates.
> * **Server manager** — starts and monitors the local server process, detects crashes, and restarts it.
> * **Runtime** — handles session lifecycle, model discovery, and event routing into ADE's chat model.

> [accordion] Permission modes
>
> OpenCode uses its own permission modes:
>
> | Mode | Behavior |
> | - | - |
> | `plan` | Read-only. |
> | `edit` | Read and write allowed; bash commands are gated. |
> | `full-auto` | Proceeds without asking. |
>
> See [Permissions](https://ade-app.dev/docs/configuration/permissions.md) for how modes map across providers.

## Using Windsurf alongside ADE

ADE doesn't run [Windsurf](https://windsurf.com) as an agent runtime — ADE runs thirteen provider runtimes, and Windsurf is not one of them. But you can still use Windsurf as your editor on the same code, because a lane is just a git worktree on disk.

**1. Find the lane's worktree path**

Open the lane in ADE; its worktree path is shown in the lane detail header (under `.ade/worktrees/`).

**2. Open that folder in Windsurf**

Open the worktree directory in Windsurf the way you normally open any project — from Windsurf, or with `windsurf <path>` if its CLI is on your `PATH`.

**3. Edit, and ADE keeps up**

ADE watches the worktree, so edits you save in Windsurf show up in the lane's diff, Files view, and Git status in real time. Use Windsurf's own AI features in the editor; ADE doesn't route requests through Windsurf.

> [!NOTE]
>
> Edit inside the **lane's worktree** (`.ade/worktrees/<lane>/…`), not the primary checkout — otherwise your changes won't land in that lane's diff.

> [card] [AI providers](https://ade-app.dev/docs/configuration/ai-providers.md)
>
> Connect each agent and set defaults.

> [card] [Agent chat](https://ade-app.dev/docs/chat/overview.md)
>
> Run OpenCode in a lane and compare it with other providers.


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