feat: switch opencode to opencode2 #9

Merged
marti merged 1 commit from feat/opencode2 into main 2026-10-27 08:47:17 +01:00
Owner

Summary

The opencode options now install opencode 2 from the locked llm-agents input (no flake.lock change).

 apps.opencode
-  cli.package      = llm-agents.opencode
-  desktop.package  = llm-agents.opencode-desktop
+  cli.package      = llm-agents.opencode2           # 2.1.2, binary `opencode2`
+  desktop.package  = llm-agents.opencode2-desktop
-home.shellAliases.oc = "opencode"
+home.shellAliases.oc = "opencode2"

opencode 2 reads the same ~/.config/opencode/opencode.json and migrates the v1 keys in memory (mcp -> mcp.servers, plugin -> plugins, provider -> providers, autoupdate -> update), so the rest of the module is unchanged. The comments in plugins.nix and providers.nix now note the plugin gap below.

Evidence

  • Before: opencode models -> cumsek 10, unnic 3, opencode 9
    After: opencode2 models -> opencode 9 only. The log shows configured plugin path must be a directory for both file plugins.
  • opencode2 debug config reads ~/.config/opencode/opencode.json, and opencode2 debug agents lists the subagents with their rendered prompts.
  • nix flake check: all checks passed.

Merge Danger

Door: two-way

Revert the commit, or set apps.opencode.cli.package back to pkgs.llm-agents.opencode.

Blast Radius: opencode-only

Known regressions in opencode until the plugins are ported to v2 plugin directories:

  • The ponytail plugin does not load.
  • The LiteLLM gateway providers (cumsek, unnic) list no models.
  • opencode is no longer on PATH; use oc or opencode2.

🤖 Generated with Claude Code

## Summary The opencode options now install opencode 2 from the locked `llm-agents` input (no `flake.lock` change). ```diff apps.opencode - cli.package = llm-agents.opencode - desktop.package = llm-agents.opencode-desktop + cli.package = llm-agents.opencode2 # 2.1.2, binary `opencode2` + desktop.package = llm-agents.opencode2-desktop -home.shellAliases.oc = "opencode" +home.shellAliases.oc = "opencode2" ``` opencode 2 reads the same `~/.config/opencode/opencode.json` and migrates the v1 keys in memory (`mcp` -> `mcp.servers`, `plugin` -> `plugins`, `provider` -> `providers`, `autoupdate` -> `update`), so the rest of the module is unchanged. The comments in `plugins.nix` and `providers.nix` now note the plugin gap below. ## Evidence - **Before:** `opencode models` -> `cumsek` 10, `unnic` 3, `opencode` 9 **After:** `opencode2 models` -> `opencode` 9 only. The log shows `configured plugin path must be a directory` for both file plugins. - `opencode2 debug config` reads `~/.config/opencode/opencode.json`, and `opencode2 debug agents` lists the subagents with their rendered prompts. - `nix flake check`: all checks passed. ## Merge Danger **Door:** two-way Revert the commit, or set `apps.opencode.cli.package` back to `pkgs.llm-agents.opencode`. **Blast Radius:** opencode-only Known regressions in opencode until the plugins are ported to v2 plugin directories: - The ponytail plugin does not load. - The LiteLLM gateway providers (`cumsek`, `unnic`) list no models. - `opencode` is no longer on PATH; use `oc` or `opencode2`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The opencode CLI and desktop options now default to the opencode2 and
opencode2-desktop packages from llm-agents, and the `oc` alias runs
opencode2. opencode 2 reads the same ~/.config/opencode and migrates the
v1 keys, but only loads plugin directories, so the ponytail and LiteLLM
gateway file plugins are skipped there for now.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
marti merged commit c898182b99 into main 2026-10-27 08:47:17 +01:00
marti deleted branch feat/opencode2 2026-10-27 08:47:21 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marti/agent-env!9
No description provided.