Skip to content

Add support for Apple Silicon Homebrew installation paths#199

Merged
subsy merged 2 commits intomainfrom
claude/investigate-issue-152-35tWL
Jan 22, 2026
Merged

Add support for Apple Silicon Homebrew installation paths#199
subsy merged 2 commits intomainfrom
claude/investigate-issue-152-35tWL

Conversation

@subsy
Copy link
Owner

@subsy subsy commented Jan 22, 2026

Summary

This PR adds support for Apple Silicon (ARM64) Homebrew installations by including the /opt/homebrew directory in both the OpenCode agent plugin's binary search paths and the sandbox wrapper's macOS system directories.

Changes

  • OpenCodeAgentPlugin: Added /opt/homebrew/bin to the binaryPaths array to allow the agent to discover binaries installed via Homebrew on Apple Silicon Macs
  • SandboxWrapper: Added /opt/homebrew to MACOS_SYSTEM_DIRS to permit sandbox access to the Apple Silicon Homebrew prefix directory

Details

Apple Silicon Macs use /opt/homebrew as the default Homebrew installation prefix (instead of /usr/local on Intel Macs). These changes ensure that:

  1. The OpenCode agent can locate and execute Homebrew-installed binaries on Apple Silicon systems
  2. The sandbox environment properly allows access to Homebrew-managed system resources

This improves compatibility and user experience for developers using Apple Silicon Macs.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Extended OpenCode agent and sandbox wrapper to support Apple Silicon Homebrew installation directories on macOS, ensuring proper binary discovery and system integration for machines using Homebrew package management.

✏️ Tip: You can customize this high-level summary in your review settings.

On Apple Silicon Macs, Homebrew installs to /opt/homebrew instead of
/usr/local. The sandbox profile was missing this path, causing
sandbox-exec to fail with exit code 134 when running Homebrew-installed
agents like opencode.

- Add /opt/homebrew to MACOS_SYSTEM_DIRS for read-only access
- Add /opt/homebrew/bin to OpenCode agent's binaryPaths

Fixes #152
@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
ralph-tui Ready Ready Preview, Comment Jan 22, 2026 10:11pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

Walkthrough

Two configuration files updated to support Apple Silicon macOS systems by adding the Homebrew installation path '/opt/homebrew' and its binary subdirectory to the OpenCode agent's sandbox requirements and the sandbox wrapper's macOS system directories list.

Changes

Cohort / File(s) Summary
OpenCode Agent Configuration
src/plugins/agents/builtin/opencode.ts
Added '/opt/homebrew/bin' to the sandbox binaryPath list for locating the opencode binary on Apple Silicon Macs
Sandbox System Directories
src/sandbox/wrapper.ts
Added '/opt/homebrew' to MACOS_SYSTEM_DIRS as a read-only binding, marking it as the Apple Silicon Homebrew prefix

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Silicon hops on Homebrew paths,
Apple's ARM finds its own laths,
Binaries brew where bunnies run,
macOS magic, all in one!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately reflects the main purpose of the changeset: adding support for Apple Silicon Homebrew paths in two files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.86%. Comparing base (6b0b291) to head (23d62a9).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   44.85%   44.86%           
=======================================
  Files          78       78           
  Lines       22872    22873    +1     
=======================================
+ Hits        10260    10261    +1     
  Misses      12612    12612           
Files with missing lines Coverage Δ
src/plugins/agents/builtin/opencode.ts 73.05% <100.00%> (ø)
src/sandbox/wrapper.ts 83.65% <100.00%> (+0.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@subsy subsy merged commit 4a36a29 into main Jan 22, 2026
7 checks passed
@subsy subsy deleted the claude/investigate-issue-152-35tWL branch January 22, 2026 22:12
sakaman pushed a commit to sakaman/ralph-tui that referenced this pull request Feb 15, 2026
…35tWL

Add support for Apple Silicon Homebrew installation paths
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.

2 participants

Comments