opencode icon indicating copy to clipboard operation
opencode copied to clipboard

tui failed to send message: RipgrepExtractionFailedError

Open wickertongue opened this issue 5 months ago • 4 comments

Hi there! I experienced an issue setting up opencode on macos with github-copilot today.


Context

I installed opencode on macos using homebrew:

brew install sst/tap/opencode

And am running opencode version:

opencode --version
0.4.1

Following install, I authorised with github with the below:

opencode auth login

The Issue

I ran /init within one of my repositories. No actions are returned, and an error message is sometimes shown (but not always). The command /init command gerates the prompt, but there is no reply from the agent.

Looking into the logs, I see the below:

INFO  2025-08-08T11:02:33 +0ms service=bus type=session.idle publishing
INFO  2025-08-08T11:02:33 +1ms service=server duration=634 response
ERROR 2025-08-08T11:02:33 +2ms service=tui failed to send message: POST "http://127.0.0.1:51603/session/ses_776a73a8cffemjSMzb4beF6UGj/message": 400 Bad Request {"name":"RipgrepExtractionFailedError","data":{"filepath":"/Users/wickertongue/.local/share/opencode/bin/rg","stderr":"tar: unrecognized option '--include=*/rg'\nTry 'tar --help' or 'tar --usage' for more information.\n"}}
INFO  2025-08-08T11:02:36 +3167ms service=tui offset=0 x=102 y=4 mouse
INFO  2025-08-08T11:02:36 +1ms service=tui end=-1,-1 start=102,4 mouse selection

The Manual Solution

EDIT: replaced repgrip with ripgrep in the below. I muddled my i's and e's.

Currently, this error can be solved by installing ripgrep:

brew install ripgrep

Running opencode following the install of ripgrep allows the /init function to run.


Closing Thoughts

It looks like opencode has a dependency on ripgrep and assumes the user has it installed already. Happy to provide any further help if necessary 😄

wickertongue avatar Aug 08 '25 12:08 wickertongue

FYI this should be ripgrep not repgrip

gitteri avatar Sep 18 '25 23:09 gitteri

is anyone still having this issue?

rekram1-node avatar Sep 19 '25 00:09 rekram1-node

I just hit this on a fresh laptop on the latest opencode from brew. brew installing ripgrep fixed it

jquense avatar Dec 08 '25 18:12 jquense

ill add it as a dep to the brew formulas

rekram1-node avatar Dec 08 '25 22:12 rekram1-node