published fresh until

OpenCode: migrate agent configuration from V1 to V2

Summary As of November 2026, OpenCode V2 reads supported V1 agent definitions without a rewrite. Optional native conversion renames agent/mode to agents, prompt to system, disable to disabled, and maxSteps to steps. Convert each file’s frontmatter together. Begin with opencode.

Not for Claude Code agent Markdown configuration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Keep a copy of the V1 setup, start V2 with opencode, and check existing supported definitions before choosing native conversion.

Short answer

V2 normalizes supported V1 fields in memory without rewriting the file. Native V2 syntax is optional. Both versions use the same command and configuration locations; remove a package-managed V1 install before installing V2. The curl installer replaces the V1 binary.

What to do

Project config can remain in opencode.json(c) or .opencode/opencode.json(c).

V1 / existing formNative V2 / action
agent, deprecated mode mapsagents; old mode-map entries become primary agents
prompt in JSONsystem; keep agent Markdown bodies as instructions
disabledisabled; the example preserves false
maxStepssteps
Separate model, variantprovider/model#variant; example anthropic/claude-sonnet-5-5 + high → anthropic/claude-sonnet-5-5#high
permission: {"edit":"deny"}permissions: [{"action":"edit","resource":"*","effect":"deny"}]
Agent temperature, top_p, optionsSet sampling/provider controls on a model variant; agent request.body is retained but not sent to the model
agent/, agents/, mode/, modes/All remain discoverable; preferred .opencode/agents/<name>.md
Move mode/ or modes/ file to agents/Add mode: primary to frontmatter
Move agent/ file to agents/Relative path preserves its path-derived ID
tui.json(c)On first V2 terminal startup, supported global tui.json settings and persisted preferences migrate if cli.json is absent; project-local settings are not migrated

Convert every frontmatter field in one file together: any of permissions, request, system or disabled makes it V2. V1 fields such as name, tools, permission or temperature in that file are ignored with a log warning. At the top level, supported V1 and V2 fields can coexist; a valid native V2 value wins regardless of key order.

Limits and open questions

Keep each nested agent definition entirely in one format. Do not point V1 at files converted to V2-only syntax. V1 plugins do not run in V2 and must be ported to the new plugin API; server integrations also need their new API contracts. This page gives no release date for V2.

Not for: Claude Code agent Markdown configuration.

Sources

Checked

2026-11-17; read Migrate from V1; no command was run.

Started from a post by @OpenCode, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenCode: migrate agent configuration from V1 to V2
Summary: As of November 2026, OpenCode V2 reads supported V1 agent definitions without a rewrite. Optional native conversion renames `agent`/`mode` to `agents`, `prompt` to `system`, `disable` to `disabled`, and `maxSteps` to `steps`. Convert each file’s frontmatter together. Begin with `opencode`.
Copy for agent
get the whatworks thread opencode-migrate-agent-configuration-to-version-two and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread opencode-migrate-agent-configuration-to-version-two
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks