OpenCode Not Found
What to do when CodeMantis cannot detect your OpenCode CLI installation.
If Settings › Agents shows the OpenCode card as "Not installed" but you've already installed OpenCode, the CLI is most likely on disk but not on the PATH that CodeMantis can see. This page covers the fixes in order.
Looking for a different agent? See Claude Code Not Found or Codex Not Found instead.
Step 1: Confirm OpenCode Is Actually Installed
Open a terminal and run:
-
macOS / Linux:
which opencode -
Windows (PowerShell):
Get-Command opencode(orwhere opencodein Command Prompt) -
If it prints a path (e.g.
/usr/local/bin/opencode, your npm global bin directory, or%APPDATA%\npm\opencode.cmdon Windows), OpenCode is installed and the issue is PATH visibility for the CodeMantis app. Continue to Step 2. -
If it prints nothing, OpenCode is not installed. Install it with
curl -fsSL https://opencode.ai/install | bashornpm install -g opencode-ai, then come back. See Installing OpenCode for the full setup walkthrough.
Step 2: Re-check from CodeMantis
On the OpenCode card in Settings › Agents, click the Re-check button. CodeMantis re-probes your machine. Sometimes a fresh shell environment or a recent install hasn't been picked up yet — the card refreshes on Re-check and on tab open.
Step 3: Fix Your PATH
If detection still fails, the binary is in a location the app's environment doesn't include (common with nvm, volta, or fnm on macOS, or with the npm global directory on Windows).
macOS (zsh, the default shell)
Add your npm global bin directory to your PATH:
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcIf you used the curl | bash installer, add the directory it reported to your PATH the same way.
Windows
Find your npm global directory:
npm config get prefixThis is typically %APPDATA%\npm. Add that directory to your PATH via System Properties › Environment Variables › Path, then open a new terminal.
After any PATH change, quit and relaunch CodeMantis so it inherits the updated environment, then click Re-check on the OpenCode card.
Step 4: Check the Version Banner
If the card detects OpenCode but won't let you use it, look at the banner:
- Too old (red banner) — your OpenCode is below the minimum supported version. Update the CLI, then Re-check.
- Newer than tested (amber banner) — OpenCode is ahead of the tested range. It runs anyway, with a one-time notice per session; no action is required.
The install commands and the tested version range are always shown on the card.
Common Causes
nvm/volta/fnmshells — npm globals install under the active Node version directory, which isn't on the system PATH. Add that version's bin directory to your shell config, then relaunch CodeMantis.- npm global directory not on PATH (Windows) — add
%APPDATA%\npm(or whatevernpm config get prefixreports) to your user PATH. pnpm/yarnglobal — these use their own global directories. Find the bin path withpnpm bin -goryarn global bin.- Just-installed in a different terminal — quit and relaunch CodeMantis so it inherits the updated environment.
- Card is green but sessions fail — that's not a detection problem. A missing provider key shows an Open OpenCode settings button on the error; add a provider on the OpenCode card. See Installing OpenCode.
Still Stuck?
You don't need OpenCode to use CodeMantis — if Claude Code or Codex is installed and authenticated, the app works exactly as it did before OpenCode support shipped. OpenCode is an additional agent option, not a requirement.
If you want help getting OpenCode working, reach out on our Discord or email [email protected] and include:
- The output of
which opencode(macOS/Linux) orGet-Command opencode(Windows) - The version shown on the OpenCode card (and the tested range next to it)
- Which Node version manager (if any) you use
- The exact text of the banner or hint on the OpenCode card