You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
skill() tool fails: ripgrep archive did not contain executable (macOS arm64, v1.14.18) #23426
This issue might be a duplicate of existing issues. Please check:
ripgrep broken after upgrading to opencode 1.14.18 #23411: Same error message ("ripgrep archive did not contain executable") after upgrading to opencode 1.14.18, affecting Linux — your issue may be the macOS arm64 variant of the same underlying regression.
opencode looks for ripgrep at ~/.cache/opencode/bin/rg, and if that file already exists it uses it and skips the download entirely. The failure happens in the download-and-extract step - the tarball comes down fine, but unpacking it doesn't produce the rg binary at the expected path, so opencode falls back to plain grep and search quietly gets worse.
The fix is just to create that file yourself. Opencode probably already downloaded the tarball (it's sitting at ~/.cache/opencode/bin/ripgrep-*.tar.gz), it just failed to unpack it - so you can extract rg straight from what's already there, no extra install needed:
After that, explore/search work correctly again. If you'd rather use a ripgrep you already have installed, cp "$(command -v rg)" ~/.cache/opencode/bin/rg && chmod +x ~/.cache/opencode/bin/rg does the same thing.
I also wrote a slightly longer version with comments and a system-ripgrep fallback in case anyone wants something more robust to drop in a setup script:
#!/usr/bin/env bash
# Fix for opencode's "ripgrep archive did not contain executable" error.
#
# opencode looks for ripgrep at ~/.cache/opencode/bin/rg and, if that file
# already exists, uses it and skips its own download. The bug is that its
# download+extract step fails on some machines, so that file never gets created
# and search silently falls back to plain grep. This script just creates it.
set -eu
# Where opencode expects the ripgrep binary (XDG-aware, works on Linux + macOS).
BIN="${XDG_CACHE_HOME:-$HOME/.cache}/opencode/bin"
mkdir -p "$BIN"
# Option 1: reuse the tarball opencode already downloaded but failed to unpack.
# It's version-matched and needs no extra install.
TARBALL="$(ls "$BIN"/ripgrep-*.tar.gz 2>/dev/null | head -1)"
if [ -n "$TARBALL" ]; then
echo "Found opencode's downloaded tarball, extracting rg from it..."
TMP="$(mktemp -d)"
tar -xzf "$TARBALL" -C "$TMP"
RG="$(find "$TMP" -name rg -type f -perm -u+x 2>/dev/null | head -1)"
if [ -n "$RG" ]; then
cp -f "$RG" "$BIN/rg"
chmod +x "$BIN/rg"
fi
rm -rf "$TMP"
fi
# Option 2: no usable tarball? fall back to a ripgrep already installed on PATH.
# The [ -f ] check ensures we copy a real binary, not a shell alias/function.
if [ ! -x "$BIN/rg" ]; then
SYSTEM_RG="$(command -v rg 2>/dev/null || true)"
if [ -n "$SYSTEM_RG" ] && [ -f "$SYSTEM_RG" ]; then
echo "Copying your system ripgrep from $SYSTEM_RG ..."
cp -f "$SYSTEM_RG" "$BIN/rg"
chmod +x "$BIN/rg"
fi
fi
# Report the result.
if [ -x "$BIN/rg" ]; then
echo "Done: $BIN/rg -> $("$BIN/rg" --version | head -1)"
else
echo "Couldn't fix it automatically: no opencode tarball found and no ripgrep on PATH."
echo "Install ripgrep first (macOS: brew install ripgrep, Debian/Ubuntu: sudo apt install ripgrep), then re-run."
fi
(Root cause still seems worth fixing in opencode's extract logic — this is just an unblock in the meantime.)
Activity
github-actions commentedon Apr 19, 2026
This issue might be a duplicate of existing issues. Please check:
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
marcinciarka commentedon Jul 20, 2026
Just had the same issue and managed to fix it.
opencode looks for ripgrep at ~/.cache/opencode/bin/rg, and if that file already exists it uses it and skips the download entirely. The failure happens in the download-and-extract step - the tarball comes down fine, but unpacking it doesn't produce the rg binary at the expected path, so opencode falls back to plain grep and search quietly gets worse.
The fix is just to create that file yourself. Opencode probably already downloaded the tarball (it's sitting at ~/.cache/opencode/bin/ripgrep-*.tar.gz), it just failed to unpack it - so you can extract rg straight from what's already there, no extra install needed:
After that, explore/search work correctly again. If you'd rather use a ripgrep you already have installed, cp "$(command -v rg)" ~/.cache/opencode/bin/rg && chmod +x ~/.cache/opencode/bin/rg does the same thing.
I also wrote a slightly longer version with comments and a system-ripgrep fallback in case anyone wants something more robust to drop in a setup script:
(Root cause still seems worth fixing in opencode's extract logic — this is just an unblock in the meantime.)