not installed or not executable - OpenCode
Quick fix
Upgrade CC Switch to v3.11.0+ for the path detection fix, or symlink opencode into ~/.local/bin by hand.
Symptom
Section titled “Symptom”not installed or not executableIn versions before v3.11.0, the CC Switch environment detection did not cover the default path the official OpenCode install script uses (`~/.opencode/bin`), so the GUI process missed it because of an inconsistent PATH environment variable. The cluster also holds other independent OpenCode problems: under WSL, CC Switch may not recognise the config file and has to be pointed at `\\wsl.localhost\Ubuntu\home\<user>\.config\opencode`; and in v3.16.5 and earlier, the generated session resume command had the wrong format (using `opencode session resume` where `opencode -s` is correct).
Upgrade CC Switch to v3.11.0 or newer (v3.16.5 or above preferred, which also fixes the wrong session resume command format).
If you cannot upgrade right away, add OpenCode to the system PATH with a symlink to work around the detection: run `mkdir -p ~/.local/bin && ln -sf ~/.opencode/bin/opencode ~/.local/bin/opencode`, then restart CC Switch and refresh the detection.
Under WSL, make sure the OpenCode config directory points at `\\wsl.localhost\Ubuntu\home\<user-name>\.config\opencode`.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 4 real issues
- Does OpenCode not being detected affect normal use?
- No. The detection only displays a version number on the settings page. As long as the opencode command runs in a terminal, the core CC Switch features still work.
- Why does configuring the OpenCode directory in WSL keep erroring?
- The default OpenCode config file location in WSL is `\\wsl.localhost\Ubuntu\home\<user-name>\.config\opencode` — check the directory you configured matches.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.