Skip to content

fix(install): migrate v0.10.8 OpenCode agent profiles on upgrade (#2264) - #2393

Merged
DeusData merged 1 commit into
mainfrom
fix/issue-2264
Sep 28, 2026
Merged

DeusData merged 1 commit into
mainfrom
fix/issue-2264

Conversation

@DeusData

Copy link
Copy Markdown
Owner

v0.11.0 (#1933) added the tool_search / tool_search_regex permissions to the OpenCode subagent profile. The installer recognises a profile as its own only if it matches the current render or a known released render, and the v0.10.8 OpenCode render was not in that set. Upgrading from v0.10.8 therefore reported all three untouched profiles as "preserved modified profile", recorded op=agent_install errors, and stopped the activation.

  • cbm_render_graph_profile_opencode_v0108() renders the previous shape in both access modes, and install and uninstall now list it as a released render. Those files are upgraded in place and uninstall removes them as owned. Profiles a user really edited are still preserved.
  • Install and uninstall now share one helper for the released-render list, and the two legacy renderers share one implementation. The memory-core baseline for cli.c drops from 173 to 170.

Test: cli_tiered_opencode_profiles_migrate_v0108_render fails before the fix, passes after it, and fails again when it is reverted. agent_profiles 13/13 and cli 323/323 pass; make -f Makefile.cbm lint-ci passes.

Proof: v0.10.8 release (checksum verified) upgraded to this build in an isolated HOME. Before: rc=1 and three agent_install errors, with the reporter's exact byte sizes (1729/1880/1910). After: rc=0 and the profiles are upgraded.

The Codex and OpenCode op=mcp_install errors in the same report depend on the reporter's own config files and are handled separately (Codex: #2324).

Thanks to @zakblacki for the complete transcript.

Fixes #2264

Upgrading from v0.10.8 to v0.11.0 on a machine with OpenCode reported all
three OpenCode subagent profiles as "preserved modified profile" plus an
op=agent_install error each, and the activation stopped ("one or more agent
configurations failed; the published/current executable was kept"), although
nobody had edited those files.

Root cause: #1933 (v0.11.0) added the tool_search / tool_search_regex
permissions to the rendered OpenCode profile. Install and uninstall recognise
a profile as ours only when it matches the current rendering or one of the
known released renderings (the other access mode, the v0.9.1-rc.1 Codex
shape, the pre-tier Verify file). The v0.10.8 OpenCode shape was not in that
set, so cbm_text_migrate_owned_document classified the untouched v0.10.8
files as user-modified. Reproduced end to end: install with the v0.10.8
release binary, then install with v0.11.0/main, into an isolated HOME; the
three profiles are 1729/1880/1910 bytes, the same sizes as in the report.

cbm_render_graph_profile_opencode_v0108() renders the pre-#1933 shape
(both access modes), and install/uninstall now list it as a released
rendering, so those files are upgraded in place and uninstall removes them
as owned. A profile the user actually edited is still preserved. The
released-list assembly that install and uninstall duplicated moves into one
helper, and the two legacy renderers share one implementation (cli.c drops
three raw free sites; the memory-core baseline is tightened 173 -> 170).

The Codex and OpenCode op=mcp_install errors in the same report do not
reproduce from a pristine v0.10.8 config and depend on the reporter's own
config.toml / opencode.json; they are not addressed here.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData DeusData mentioned this pull request Sep 28, 2026
2 tasks done
@DeusData
DeusData merged commit 2278498 into main Sep 28, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install or Upgrade throwing errors on Mac

1 participant