Replace the OpenCode 2 npm beta with the stable Homebrew opencode 2.2.6 build.
configuration.nix: declare { name = "opencode"; link = false; }. link = false makes brew bundle install the formula and then unlink it, so /opt/homebrew/bin/opencode stays the npm-installed OpenCode 1.x CLI that the crew harness runs. This is deterministic because the pinned nix-darwin homebrew module (d31953c) supports this per-brew attribute and emits brew "opencode", link: false, trusted: true in the generated Brewfile (verified with nix eval). Relying on Homebrew's default "conflict, do not link" behavior would depend on install order and prior link state.
home.nix: remove home.activation.opencode2 and the npm beta install. node stays in brews for backpass and acpx.
home/bin/oc2: default to /opt/homebrew/opt/opencode/bin/opencode, keep OPENCODE2_BIN as the override, keep the OPENCODE_CONFIG isolation unchanged.
rebuild.sh: remove the retired npm beta @opencode-ai/cli if present, using Homebrew's npm, with a local-only check so an offline rebuild skips it and never fails. The OpenCode 1.x install block is unchanged.
AGENTS.md: correct the notes: stable formula, installed unlinked, launched only through home/bin/oc2, npm beta removed at rebuild time, and a build switch needs opencode service restart because of Background service uses an incompatible health protocol.
Verification (in the worktree)
bash -n home/bin/oc2 and bash -n rebuild.sh: ok
nix-instantiate --parse home.nix and nix-instantiate --parse configuration.nix: ok
home/bin/oc2 --version with OPENCODE2_BIN unset: opencode v2.2.6
home/bin/oc2 models with OPENCODE2_BIN unset: lists opencode-go/... models (isolated config and stored account resolve)
The rebuild will run: /opt/homebrew/bin/npm uninstall -g @opencode-ai/cli only when that global package is installed.
Out of scope
Moving the crew harness from OpenCode 1.x to OpenCode 2.x
Any change to firstmate's own config
No darwin-rebuild, rebuild.sh, brew install, or uninstall was run as part of this change.
## Summary
Replace the OpenCode 2 npm beta with the stable Homebrew `opencode` 2.2.6 build.
- `configuration.nix`: declare `{ name = "opencode"; link = false; }`. `link = false` makes `brew bundle` install the formula and then unlink it, so `/opt/homebrew/bin/opencode` stays the npm-installed OpenCode 1.x CLI that the crew harness runs. This is deterministic because the pinned nix-darwin homebrew module (`d31953c`) supports this per-brew attribute and emits `brew "opencode", link: false, trusted: true` in the generated Brewfile (verified with `nix eval`). Relying on Homebrew's default "conflict, do not link" behavior would depend on install order and prior link state.
- `home.nix`: remove `home.activation.opencode2` and the npm beta install. `node` stays in `brews` for backpass and acpx.
- `home/bin/oc2`: default to `/opt/homebrew/opt/opencode/bin/opencode`, keep `OPENCODE2_BIN` as the override, keep the `OPENCODE_CONFIG` isolation unchanged.
- `rebuild.sh`: remove the retired npm beta `@opencode-ai/cli` if present, using Homebrew's npm, with a local-only check so an offline rebuild skips it and never fails. The OpenCode 1.x install block is unchanged.
- `AGENTS.md`: correct the notes: stable formula, installed unlinked, launched only through `home/bin/oc2`, npm beta removed at rebuild time, and a build switch needs `opencode service restart` because of `Background service uses an incompatible health protocol`.
## Verification (in the worktree)
- `bash -n home/bin/oc2` and `bash -n rebuild.sh`: ok
- `nix-instantiate --parse home.nix` and `nix-instantiate --parse configuration.nix`: ok
- `nix eval .#darwinConfigurations.lt-mbp.config.homebrew.brewfile` contains `brew "opencode", link: false, trusted: true`
- `home/bin/oc2 --version` with `OPENCODE2_BIN` unset: `opencode v2.2.6`
- `home/bin/oc2 models` with `OPENCODE2_BIN` unset: lists `opencode-go/...` models (isolated config and stored account resolve)
The rebuild will run: `/opt/homebrew/bin/npm uninstall -g @opencode-ai/cli` only when that global package is installed.
## Out of scope
- Moving the crew harness from OpenCode 1.x to OpenCode 2.x
- Any change to firstmate's own config
No `darwin-rebuild`, `rebuild.sh`, `brew install`, or uninstall was run as part of this change.
Declare the opencode formula with link = false so it never replaces the
npm-installed OpenCode 1.x CLI at /opt/homebrew/bin/opencode. Drop the npm
beta install from home.activation.opencode2, point home/bin/oc2 at the keg
binary, and correct the related notes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Replace the OpenCode 2 npm beta with the stable Homebrew
opencode2.2.6 build.configuration.nix: declare{ name = "opencode"; link = false; }.link = falsemakesbrew bundleinstall the formula and then unlink it, so/opt/homebrew/bin/opencodestays the npm-installed OpenCode 1.x CLI that the crew harness runs. This is deterministic because the pinned nix-darwin homebrew module (d31953c) supports this per-brew attribute and emitsbrew "opencode", link: false, trusted: truein the generated Brewfile (verified withnix eval). Relying on Homebrew's default "conflict, do not link" behavior would depend on install order and prior link state.home.nix: removehome.activation.opencode2and the npm beta install.nodestays inbrewsfor backpass and acpx.home/bin/oc2: default to/opt/homebrew/opt/opencode/bin/opencode, keepOPENCODE2_BINas the override, keep theOPENCODE_CONFIGisolation unchanged.rebuild.sh: remove the retired npm beta@opencode-ai/cliif present, using Homebrew's npm, with a local-only check so an offline rebuild skips it and never fails. The OpenCode 1.x install block is unchanged.AGENTS.md: correct the notes: stable formula, installed unlinked, launched only throughhome/bin/oc2, npm beta removed at rebuild time, and a build switch needsopencode service restartbecause ofBackground service uses an incompatible health protocol.Verification (in the worktree)
bash -n home/bin/oc2andbash -n rebuild.sh: oknix-instantiate --parse home.nixandnix-instantiate --parse configuration.nix: oknix eval .#darwinConfigurations.lt-mbp.config.homebrew.brewfilecontainsbrew "opencode", link: false, trusted: truehome/bin/oc2 --versionwithOPENCODE2_BINunset:opencode v2.2.6home/bin/oc2 modelswithOPENCODE2_BINunset: listsopencode-go/...models (isolated config and stored account resolve)The rebuild will run:
/opt/homebrew/bin/npm uninstall -g @opencode-ai/clionly when that global package is installed.Out of scope
No
darwin-rebuild,rebuild.sh,brew install, or uninstall was run as part of this change.