OpenCode 2 Has 3 Breaking Changes. 1 Broke My Startup.
Описание и применение
Обновление OpenCode с версии 1.19.0 до 2.0.28 привело к неожиданным ошибкам загрузки плагинов, скрытой миграции конфигурации и оставлению обеих версий в системе, что нарушило рабочий процесс стартапа.
Задача
Upgrading from OpenCode 1.19.0 to OpenCode 2.0.28 caused unexpected failures and silent configuration changes that broke a startup’s workflow.
Результат
The upgrade left both v1 and v2 binaries on the machine, silently rewrote configuration files, and caused plugin incompatibility, leading to a broken startup workflow.
Рабочий процесс
- 1. Install OpenCode 1.19.0 at custom prefix.
2. Verify plugin and config files exist.
3. Run
opencode upgrade --major --method npm. 4. Observe long download and custom prefix behavior. 5. Start OpenCode 2 and note WARN about plugin load. 6. Runopencode plugin listto see missing IDs. 7. Drop a v2‑style plugin to confirm new format works. 8. Runopencode2 run "hello"andopencode2 debug configto see no cli.json. 9. Start TUI to trigger cli.json migration. 10. Inspect opencode.json before and after to see permission and mcp changes.
Доказательства
It needed more than 8 minutes. My first attempt (500s timeout) was killed mid-download, with the shared npm cache already at 493 MB.
level=WARN message="failed to load plugin" target=/tmp/oc2test/home/.config/opencode/plugin/secret-guard.ts cause="Cause([Fail(PluginModule.LoadError: Plugin must export a default definition with an id and an effect or setup function. (cause: SchemaError(Missing key at ["default"])))]"
level=INFO message="migrated cli config" from=["/tmp/oc2test/home/.config/opencode/tui.json"] to=/tmp/oc2test/home/.config/opencode/cli.json
- Дата записи: 2026-10-13T13:56:02.450Z