Agent Providers
OpenCode
Use OpenCode with Verun — prerequisites, selecting the agent, and Verun-specific configuration.
OpenCode is an open-source, terminal-based AI coding agent that works with multiple model providers including Anthropic, OpenAI, and local models.
Overview
OpenCode runs as a terminal process that Verun manages inside each task's worktree. It reads your codebase, writes code, and runs terminal commands — all within the isolated worktree.
Prerequisites
- OpenCode installed
- An API key for your chosen model provider
- Node.js 18+
Verify the CLI is available:
opencode --versionSelecting OpenCode in Verun
- Open a task from the task list.
- Click Start Session.
- In the session settings, select OpenCode from the provider dropdown.
- Choose a trust level.
- Click Start.
Alternatively, set OpenCode as the default in .verun.json:
{
"agent": "opencode"
}Configuration
OpenCode uses its own configuration file (opencode.json) for model and provider settings. Place it in your project root — it will be available inside each worktree.
Verun-specific settings via .verun.json:
{
"agent": "opencode",
"setup": ["npm install"],
"ports": [3000]
}Known Limitations
- OpenCode requires an active internet connection when using cloud model providers.
- The CLI must be installed and your API key configured before starting a Verun session — Verun does not manage CLI authentication.