Bin path not set for bash/sh if user shell is fish - break rg & jq #7146

Open
opened 2026-02-16 18:06:18 -05:00 by yindo · 2 comments
Owner

Originally created by @sam-ulrich1 on GitHub (Jan 22, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Took me a while to figure this out, but if the user is using a fish shell or some other interactive shell that's not supported for general usage, when Open Code is installed it bootstraps the environment paths for the fish shell correctly, but it doesn't address the bash or sh shells, which means that every grep or jq call breaks silently with "No results found".

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @sam-ulrich1 on GitHub (Jan 22, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Took me a while to figure this out, but if the user is using a fish shell or some other interactive shell that's not supported for general usage, when Open Code is installed it bootstraps the environment paths for the fish shell correctly, but it doesn't address the bash or sh shells, which means that every grep or jq call breaks silently with "No results found". ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:06:18 -05:00
Author
Owner

@sam-ulrich1 commented on GitHub (Jan 22, 2026):

Manual work around is to add the opencode bin path to .bashrc or .profile

@sam-ulrich1 commented on GitHub (Jan 22, 2026): Manual work around is to add the opencode bin path to .bashrc or .profile
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4968: Shell sessions losing $PATH value from parent shell (related to environment path issues)
  • #2202: PATH is not inherited from invoking shell (same root cause)
  • #6936: [FEATURE]: Pass agents bash env variables OR pass agents bashrc files (related to bash environment setup)
  • #8378: 2 bugs spotted when running Windows Desktop connects to opencode server in WSL: Shell runtime & Path Detection (related to shell path detection issues)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #4968: Shell sessions losing $PATH value from parent shell (related to environment path issues) - #2202: PATH is not inherited from invoking shell (same root cause) - #6936: [FEATURE]: Pass agents bash env variables OR pass agents bashrc files (related to bash environment setup) - #8378: 2 bugs spotted when running Windows Desktop connects to opencode server in WSL: Shell runtime & Path Detection (related to shell path detection issues) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7146