OpenCode Local for VS Code
OpenCode Local for VS Code is a Copilot-style interface for the OpenCode coding agent.
Architecture
The default transport is ACP (Agent Client Protocol):
VS Code Extension
↓ JSON-RPC over stdio
opencode acp
↓
OpenCode Agent
The extension starts opencode acp as a child process and communicates with it using newline-delimited JSON-RPC. ACP sessions use the current workspace as their working directory and provide model, mode, effort, streaming updates, tool calls, permissions, plans, and file changes.
The existing HTTP transport remains available as a fallback:
{
"opencode.transport": "http"
}
ACP is the recommended mode for the Copilot-like experience. It creates a private OpenCode process for the extension and does not reuse Desktop's shared background-service sessions.
Features
- VS Code chat sidebar
- ACP session lifecycle and streaming updates
- Model, Build/Plan mode, and reasoning effort selectors
- Human-readable activity steps for search, read, edit, command, test, retry, permissions, todos, and subagents
- Native VS Code diffs
- File attachments and workspace-aware prompts
- Optional HTTP mode for the OpenCode server API
Settings
{
"opencode.transport": "acp",
"opencode.cliPath": "opencode",
"opencode.model": "opencode/space-bunny-free",
"opencode.agent": "build",
"opencode.reasoningEffort": "medium",
"opencode.useBackgroundService": true
}
opencode.useBackgroundService applies only to HTTP mode. In ACP mode the extension starts opencode acp directly.
Authentication
Authenticate OpenCode before using the extension:
opencode auth login
Do not commit API keys, passwords, or service credentials.
Development
npm.cmd install
npm.cmd run typecheck
npm.cmd run compile
npm.cmd run test:activity
npm.cmd run test:workflow
npm.cmd run test:diff
npm.cmd run test:smoke
Marketplace