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
Windows Desktop installer is broken offline: ripgrep not bundled, core tools (grep, glob, skill) and built-in skill (customize-opencode) fail #34442
On any machine without internet access, OpenCode Desktop is effectively broken right out of the box. Three core built-in tools (grep, glob, skill) and the built-in customize-opencode skill all depend on ripgrep internally. When ripgrep is absent and cannot be downloaded, all of these fail with ripgrep execution failed.
This makes OpenCode nearly unusable offline -- you lose content search, file discovery, and all skill loading (including the only built-in skill that tells users how to configure OpenCode).
Root cause
OpenCode does not bundle ripgrep. On first run it tries to download rg from GitHub Releases into ~/.cache/opencode/bin/. If the download fails (offline machine, firewall, proxy), the cache stays empty and OpenCode never falls back to a system-installed ripgrep in PATH -- it just fails.
Steps to reproduce
Install OpenCode Desktop on a Windows machine without internet
Open a project
Try to use any skill: skill("customize-opencode")
Observe: ripgrep execution failed
Same for grep and glob tools
Impact
grep tool -- broken (content search)
glob tool -- broken (file discovery)
skill tool -- broken (skill loading, including customize-opencode)
This is especially critical for air-gapped enterprise environments and CI runners.
Suggested fix
Bundle ripgrep directly in the Windows NSIS installer (and macOS DMG, Linux packages). Ripgrep is a single statically-linked binary. The Windows x64 release of ripgrep 14.1.1 is ~4.5 MB uncompressed (~1.5 MB compressed). For a Desktop installer that is already 100+ MB, this is negligible.
Workaround (for affected users)
Copy rg.exe to any directory in PATH (e.g. C:\Windows\System32\) and restart OpenCode. OpenCode detects and uses the system ripgrep when available.
If your issue adds new information (e.g. specific to the Windows NSIS Desktop installer), feel free to keep it open and link the above for context. Otherwise, consider commenting on or upvoting the existing issues.
Closing as a duplicate of #31734, which tracks bundling ripgrep in the binary builds so grep, glob and skills work offline. Please add your use case and 👍 there.
Activity
github-actions commentedon Jun 29, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue adds new information (e.g. specific to the Windows NSIS Desktop installer), feel free to keep it open and link the above for context. Otherwise, consider commenting on or upvoting the existing issues.
Max-Null commentedon Jul 25, 2026
补充一个更具体的根因分析——我在 Windows 11 (在线环境) 上复现了这个问题,并通过解包 app.asar + 日志分析找到了下载失败的具体原因:
补充发现:在线环境也会失败
即使在有网络的 Windows 上,OpenCode Desktop 的 ripgrep 自动下载也静默失败了。日志证明:
根因:
Path.bin目录不存在查看 app.asar 中的
RipgrepBinary服务代码,ripgrep 的解析逻辑是 3 步回退:which2("rg.exe")→ 系统 PATH → 找不到~/.cache/bin/rg.exe→ OpenCode 自己的 bin 目录 → 目录不存在Path.bin→ 父目录不存在,解压静默失败关键是第 3 步中的:
其中
Path.bin = path.join(xdgCache, "bin"),在 Windows 上解析为C:\Users\<user>\.cache\bin。这个目录在全新安装 OpenCode 后不存在。两个独立的 Bug
Bug A: 下载 → 解压流程没有预先创建
~/.cache/bin/目录(缺一行mkdir -p)Bug B: 失败后没有缓存失败状态,每次启动都重新下载 ~4MB(日志里 20+ 次重复下载就是证据)
建议
即使将来捆绑了 ripgrep,也应该修复 Bug A——因为自动下载是正常的 fallback 路径,不能因为一个目录不存在就静默失败 20+ 次。
TheMasterFX commentedon Sep 13, 2026
Will it ever happen that ripgrep is buildin in the binary builds?
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #31734, which tracks bundling ripgrep in the binary builds so
grep,globand skills work offline. Please add your use case and 👍 there.