---
title: OpenCode
description: Run the open-source OpenCode agent in Glade, with its connected providers or its free models. What it needs, how to sign in, and what works.
sidebar:
  icon: "/agents/opencode.svg"
---

Glade runs your installed `opencode` CLI with every provider you've connected to it, or with its free
models.

| Requirement     | Value                                      |
| --------------- | ------------------------------------------ |
| Minimum version | 2.0.0                                      |
| Install         | [OpenCode docs](https://opencode.ai/docs/) |
| Sign in         | `opencode auth login`                      |

## Set up

1. **Install OpenCode**

    Follow the [OpenCode docs](https://opencode.ai/docs/), then check that `opencode` runs in a
    fresh terminal. Older installs can [upgrade](https://opencode.ai/docs/cli/#upgrade) in place.

2. **Connect a provider**

    Run `opencode auth login` to add one, or skip it and use OpenCode's free models.

3. **Pick a model**

    The picker lists the models of every connected provider, with effort levels read from OpenCode.

## What works

- **Chats, tools, approvals and slash commands**, the same way as Cursor and Grok Build.
- **Context meter**, from the context usage OpenCode reports.
- **Forks** copy the chat up to the reply into a fresh session.
- **`/compact`** runs OpenCode's own compaction.
- **Usage** shows the five-hour, weekly and monthly OpenCode Go windows when you're signed in to it.

## Good to know

- Messages sent mid-turn wait for the turn to finish.
- OpenCode reads its own [configuration](https://opencode.ai/docs/config/).
- Deleting a chat in Glade also deletes its OpenCode session.

## Under the hood

Glade talks to OpenCode over the [Agent Client Protocol](https://agentclientprotocol.com). Because
OpenCode keeps one MCP client per server for the whole process, each chat that uses Glade's tools gets
its own OpenCode process, so no chat ever calls Glade with another chat's credentials.
