The only intentional breaking changes in V2 are the server API and the plugin API. All other functionality is intended
to remain compatible with V1.
.opencode/ should continue to
work without changes. If one of these stops working in V2, treat it as a beta compatibility bug rather than an expected
migration requirement.
During the beta, OpenCode V1 and V2 use different executable names. You can keep using opencode for V1 while trying V2
with opencode2.
Install the beta
Install the beta from thenext distribution tag:
Configuration
This section covers both JSON/JSONC configuration and file-based definitions under.opencode/.
Use your existing configuration
V2 reads existing global and project configuration from the same locations as V1:Ask OpenCode to migrate
The V1 config format remains supported. The native V2 format is optional and makes several settings more explicit and ergonomic. The recommended migration path is to ask OpenCode to update the configuration for you:Sharing
The deprecated V1autoshare boolean becomes the explicit share policy:
"manual", "auto", or "disabled". If the V1 file already uses share, no change is needed.
Permissions and tools
V1 groups permission effects by tool. V2 uses one orderedpermissions array, making precedence and exceptions explicit:
bash is now shell, task is now subagent, and write and patch are now edit.
See Permissions for the ordered V2 rule format.
Agents and modes
The singularagent and deprecated mode maps become agents. Agent fields become more consistent with the rest of the
V2 config:
prompt becomes system, disable becomes disabled, and a separate variant joins the model reference after #.
temperature, top_p, and provider-specific options move under request.body. maxSteps becomes steps. Entries from
the old mode map become primary agents.
Snapshots
Rename the singularsnapshot field to snapshots. Its boolean value does not change:
Attachments
Rename the singularattachment object to attachments. Nested image settings keep the same names:
MCP servers
V2 groups servers undermcp.servers, replaces enabled with the inverse disabled, and separates timeout purposes:
clientId becomes client_id, clientSecret becomes client_secret,
callbackPort becomes callback_port, and redirectUri becomes redirect_uri. The V1 experimental.mcp_timeout value
also becomes the default mcp.timeout.catalog and mcp.timeout.execution values. See MCP servers.
Compaction
V2 groups the retained-context token budget underkeep and gives the reserve a clearer name:
auto and prune keep their names. V2 has no native tail_turns field; recent context is retained by token budget instead.
See Compaction.
Skills
V1 separates extra skill paths and URLs. V2 combines both into one ordered array:.opencode/skills/ discovery do not change. See Skills.
Commands
Rename the singularcommand map to commands. Join a separate model variant to the model reference:
template, description, agent, and subtask keep their names. Existing Markdown command definitions remain supported.
See Commands.
References
Rename the deprecated singularreference map to references:
references, so no change is needed when the file uses it. Reference entries keep the
same shapes. See References.
Providers
Rename the singularprovider map to providers. V2 separates the runtime package, endpoint, and request settings:
npm becomes package, and AI SDK packages receive the aisdk: prefix. api becomes settings.baseURL. Provider
options are separated into settings, headers, and body according to their request role. See Providers.
Models and variants
Models remain nested under their provider, but several model fields become more explicit:idbecomesmodelID.tool_callandmodalitiesbecomecapabilities.tools,capabilities.input, andcapabilities.output.- A
statusof"deprecated"becomesdisabled: true. - Cache costs move from
cache_readandcache_writetocache.readandcache.write. - Provider-specific
optionsbecomesettings. - A V1 variants object becomes a V2 array with an
idon each entry.
Fields without native equivalents
Most fields that keep the same shape, includingshell, model, default_agent, autoupdate, watcher, formatter,
lsp, instructions, enterprise, and tool_output, require no migration.
These V1 fields do not have one-to-one native V2 config fields:
logLevel: useOPENCODE_LOG_LEVELwhen starting OpenCode.server: use the V2 service and explicit server options; the server API is an intentional breaking change.layout: remove it; V1 already treated it as deprecated and always used stretch layout.enabled_providersanddisabled_providers: there is no native provider allowlist or denylist field yet.small_model: V2 selects models for internal maintenance agents without a separate top-level field.compaction.tail_turns: V2 usescompaction.keep.tokensinstead.
/report if V2 does not preserve the behavior you rely on.
Agent files
V1 agent files may useagent/, agents/, mode/, or modes/. V2 still discovers all four directories. The preferred
V2 location is:
mode/ or modes/ directory represent primary agents. When moving one into agents/, add
mode: primary to its frontmatter. Files under agent/ can move to agents/ without changing their path-derived ID.
When converting the frontmatter to native V2 fields:
- Keep the Markdown body as the agent’s system instructions.
- Rename
prompttosystemwhen it appears in JSON configuration; file bodies do not need asystemfield. - Rename
disabletodisabledandpermissiontopermissions. - Join
modelandvariantasprovider/model#variant. - Move
temperature,top_p, and provider-specific options underrequest.body.
Command files
V1 command files may usecommand/ or commands/. V2 discovers both. The preferred location is:
command/ to the same relative path under commands/ to preserve command names. The Markdown body remains
the command template, and description, agent, and subtask frontmatter keep the same names. If frontmatter has separate
model and variant fields, append the variant to the model and remove variant:
Skill files
V2 discovers skills from both.opencode/skill/ and .opencode/skills/. The preferred layout is:
SKILL.md, so relative scripts, references, and other supporting files remain
available. Keep the directory name stable to preserve the skill ID. Existing skill frontmatter and Markdown bodies do not
require a V2 rewrite. See Skills.
Instruction files
ExistingAGENTS.md files stay in place. V2 discovers the global ~/.config/opencode/AGENTS.md and project AGENTS.md
files from the current directory up to the project root.
If a V1 setup relied on a CLAUDE.md fallback, move that guidance into the applicable AGENTS.md. V2 currently only
discovers AGENTS.md; because non-API V1 behavior is intended to remain compatible, also run /report with the affected
project details. See Instructions.
Plugins
Renameplugin to plugins. Replace a package-and-options tuple with an object:
.opencode/plugin/ and .opencode/plugins/; use .opencode/plugins/ for V2 files.
Moving a file between these directories does not migrate its implementation.
The config entry can be translated automatically, but plugin implementation code must be ported to the new API. The V2
plugin API is still being finalized during beta, and detailed plugin migration guidance will be published when it is
ready.
Once the V2 plugin API is finalized, OpenCode should be able to migrate the majority of V1 plugins while keeping related
local modules and dependencies together. See the current beta Plugins guide.
Server API and clients
OpenCode 2 has a revised, more ergonomic server API and a new set of clients. Integrations that call the V1 server API must migrate to the V2 API. Use the@opencode-ai/client package to access the new clients. The server API and clients are still being finalized
during beta, so their contracts may continue to change. See the generated API reference for the current endpoints,
request types, and responses.
Verify your setup
Startopencode2 in a project and verify your model, provider credentials, agents, permissions, MCP servers, and plugins
before relying on the beta for regular work. Keep your V1 setup until you have confirmed the V2 behavior you need, and do
not point V1 at configuration that you have converted to the native V2 shape.