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
ripgrep broken after upgrading to opencode 1.14.18 #23411
I upgraded from opencode 1.4.10 to 1.14.18 which caused ripgrep errors appearing.
Since I upgraded opencode I can see error "ripgrep archive did not contain executable: /home/user/.cache/opencode/bin/ripgrep-YtaXXi/ripgrep-14.1.1-x86_64-unknown-linux-musl/rg" every time opencode tries to perform some search tasks.
Is this a known issue?
Is there anything that I can do to solve this issue?
Plugins
none
OpenCode version
1.14.18
Steps to reproduce
upgrade to latest opencode release (1.14.18)
clone any github repository that contains a codebase
cd into that codebase
run opencode and invoke /init
opencode will start searching the codebase and the mentioned error will appear
Screenshot and/or share link
No response
Operating System
Ubuntu 24.04
Terminal
Terminator
Reacted by Zeryther, Hadsen, Meltir, Brent Van Minnen and dddudKill
The extract helper in ripgrep.ts is wrapped with Effect.scoped, which means the temp directory created by makeTempDirectoryScoped is cleaned up the moment extract returns — before the caller can check fs.exists(extracted) or copy the binary. This causes the "archive did not contain executable" error on fresh installs (no cached rg binary yet).
Fix: remove Effect.scoped from extract so the temp directory's lifetime extends to the caller's scope, or switch to a non-scoped temp directory with manual cleanup.
Activity
github-actions commentedon Apr 19, 2026
This issue might be a duplicate of existing issues. Please check:
RipgrepExtractionFailedError/ ripgrep extraction failure symptom (reported on macOS, but the underlying issue appears similar)MajorP93 commentedon Apr 19, 2026
Narrowed it down to opencode's auto-install of ripgrep.
Not sure why this is not working.
I was able to work around this issue by installing ripgrep system-wide from Ubuntu repository.
I installed opencode via "curl -fsSL https://opencode.ai/install | bash" by the way.
kagura-chen commentedon Apr 19, 2026
I'd like to look into this.
The
extracthelper inripgrep.tsis wrapped withEffect.scoped, which means the temp directory created bymakeTempDirectoryScopedis cleaned up the momentextractreturns — before the caller can checkfs.exists(extracted)or copy the binary. This causes the "archive did not contain executable" error on fresh installs (no cachedrgbinary yet).Fix: remove
Effect.scopedfromextractso the temp directory's lifetime extends to the caller's scope, or switch to a non-scoped temp directory with manual cleanup.fix(ripgrep): use non-scoped temp directory to prevent premature clea…
github-actions commentedon Jul 5, 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.