Repository navigation
Move to OpenCode 2 and install Pi with mise - #29
Conversation
OpenCode 2 is published only as the npm package @opencode/cli; mise's registry `opencode` still resolves to 1.x. Its postinstall selects the native binary, so allow that one build script. RTK's OpenCode plugin targets the V1 plugin API and fails to load under OpenCode 2, so stop installing it and remove the stale copy until rtk-ai/rtk#3463 ships. Pi gets the same treatment as the other harnesses: mise install, update task, version-check opt-out, RTK init. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe mise configuration and README now track OpenCode 2 through ChangesCLI and RTK setup
Priority: ⚪ Not assessed Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to This change moves OpenCode to version 2 through its npm package, adds Pi, and points RTK setup at Pi. The OpenCode npm package supports Windows, and no concrete merge-blocking problem remains. Windows setup and a real Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change adds trusted upstream installation code and a new per-user agent integration, without introducing explicit privilege elevation. The incompatible OpenCode plugin is deliberately removed. No security vulnerability was established, but upstream installation behavior and interrupted or concurrent setup remain incompletely verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Stacked on #29. ## Why Three independent benchmarks (JetBrains, Glia, Quesma) put RTK at roughly cost-neutral on real agent work, with slightly more turns and flat-to-slightly-worse pass rates. Against that it costs two init scripts, a stitch in every instruction file, a `CODEX_HOME` workaround, and, after #29, a workaround for OpenCode 2 rejecting its plugin. ## What changes - `rtk` leaves the mise config and the `harness:update` task. - The `@RTK.md` stitches and the "prefix supported commands with `rtk`" instruction leave the Claude and Codex instruction templates. - The RTK init scripts are replaced by a one-time cleanup script (macOS and Windows) that runs `rtk init --uninstall` for Claude, Codex, and Pi, then `mise uninstall --all rtk`. It exits quietly on a machine that never had RTK. Delete it once every machine has applied. - `.chezmoiremove` still deletes the stale OpenCode plugin. ## Verified on macOS Ran the rendered cleanup script against a throwaway `HOME` (with `mise` stubbed so the real install was untouched) after installing all three integrations there: - It removed both `RTK.md` files, the `rtk hook` entries in `settings.json` and `hooks.json`, and the Pi extension, and left an unrelated Bash hook in place. - A second run, and a run with no RTK installed, both exit 0. - Rendered `CLAUDE.md`, `AGENTS.md`, and the mise config contain no RTK references. ## Not verified - The PowerShell script; it mirrors the shell one but was not run. - A real `chezmoi apply`. ## Left behind on purpose - RTK's own data directory (history and settings), e.g. `~/Library/Application Support/rtk`. - The `settings.json.bak` / `hooks.json.bak` files RTK writes when it edits those files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
What changes
@opencode/cli; mise's registryopencodestill resolves to 1.18.x. The tool entry becomes"npm:@opencode/cli"withallow_buildsfor that one package, because its postinstall script selects the native binary and mise blocks lifecycle scripts by default.pi = "latest"(mise registry default backend), included inharness:update,PI_SKIP_VERSION_CHECK=1so updates stay with mise, andrtk init -g --agent piin both RTK init scripts.failed to load plugin … must export a default definitionon every server start. The init scripts no longer install it and.chezmoiremovedeletes the stale~/.config/opencode/plugins/rtk.ts. Restore both when feat: add opencode v2 plugin support (opencode2) rtk-ai/rtk#3463 ships.Unchanged: the
opencode.jsoncmerge rule. OpenCode 2 reads the same config file and still honorsenabled_providers/disabled_providers.OPENCODE_DISABLE_AUTOUPDATEis still recognized by the 2.x binary.Verified on macOS (arm64)
mise installwith this config installsnpm:@opencode/[email protected]and[email protected];opencode --versionandopencode2 --versionboth reportv2.0.22. Withoutallow_buildsthe install succeeds but the binary exits with "postinstall script was not run".mise upgrade --dry-runandmise outdatedaccept the new tool list.HOME: OpenCode 2 rejects RTK's currentrtk.ts, andrtk init -g --agent pi --auto-patchinstalls only~/.pi/agent/extensions/rtk.ts.chezmoi statusagainst this branch showsD .config/opencode/plugins/rtk.tsand the init script renders with the Pi line.Not verified
win32, but nothing here was run on Windows.chezmoi apply; nothing was applied to the live home directory.After merging, per machine
chezmoi applyopencode --versionreports 2.x, thenmise uninstall --all opencodeto drop the old 1.x copy.🤖 Generated with Claude Code