codebase-memory-mcp icon indicating copy to clipboard operation
codebase-memory-mcp copied to clipboard

"install" command does not work for opencode in windows 11

Open Icaruk opened this issue 7 months ago • 25 comments

codebase-memory-mcp install

codebase-memory-mcp install 0.6.0

Error: Argument or option not valid - "eq".
Write"TASKKILL /?" for use.
Detected agents: Claude-Code VS-Code

Claude Code:
  skills: 0 installed
  mcp: C:/Users/Icaruk/.claude/.mcp.json
  mcp: C:/Users/Icaruk/.claude.json
  hooks: PreToolUse (code discovery gate)
  hooks: SessionStart (MCP usage reminder on startup/resume/clear/compact)
VS Code:
  mcp: C:/Users/Icaruk/AppData/Roaming/Code/User/mcp.json

PATH already includes C:/Users/Icaruk/.local/bin

Install complete. Restart your shell or run:
  source C:/Users/Icaruk/.profile

opencode -v

1.3.17

pwsh -v

7.6.0

(gcm opencode).Source

C:\Users\Icaruk\AppData\Local\mise\installs\npm-opencode-ai\1.3.17\opencode.ps1


claude code is not installed. Opencode is installed using mise, maybe that makes opencode not detectable?

Icaruk avatar Apr 07 '26 20:04 Icaruk

Hey, thx for reporting 🙏 Will tackle this asap after the 15th. Hope you can wait until then

DeusData avatar Apr 07 '26 23:04 DeusData

I am experiencing exactly the same. Just tried installing codebase-memory-mcp and it doesn't see my opencode. My opencode is installed via scoop package manager. I don't know how the detection work but I have opencode files in the following directories:

%USERPROFILE%\.config\opencode
%USERPROFILE%\.local\share\opencode\

However it's not added to my Apps & Features so if detection works by checking the registry then I guess that's the reason. I use Windows 11 25H2 and Opencode 1.4.6. Happy to help debugging if you can't reproduce.

ipatalas avatar Apr 16 '26 08:04 ipatalas

Two distinct problems in your report:

  1. Error: Argument or option not valid - "eq" (TASKKILL). That came from the install step killing stale MCP processes via a shell taskkill /FI "IMAGENAME eq …" string that got re-split on Windows. On current main this runs through _spawnvp with a proper argv array (no shell re-parsing), so the "eq" error should be gone. Please confirm on v0.7.0.

  2. opencode not detected (installed via mise). Root cause: find_in_path only probed the bare name opencode, but on Windows the executable is a opencode.cmd/.ps1/.exe shim — so it was invisible. Fixed: find_in_path now also tries .exe/.cmd/.bat/.ps1 per PATH entry (commit just pushed).

Could you retest install on v0.7.0? If opencode still isn't detected, please share (gcm opencode).Source (you already did — …\mise\…\opencode.ps1) and whether that dir is on %PATH%. Keeping open pending your retest. 🙏

DeusData avatar May 31 '26 10:05 DeusData

Thanks for the report. Root cause: find_in_path (used to discover CLIs like opencode during install) only probed the bare executable name. On Windows, executables carry an extension and CLIs are commonly installed as .cmd/.ps1/.exe shims (via mise, npm, etc.), so the bare-name probe never matched — opencode was present on PATH but the installer couldn't find it.

Fixed in commit 0485d3f: on Windows, find_in_path now probes the common PATHEXT variants (.exe, .cmd, .bat, .ps1) for each PATH entry before moving on.

Verified compiling and passing on Windows in CI (the build-windows and test-windows jobs are green with this change). This ships in the next release — after updating, install should discover opencode on Windows 11. Thanks again!

DeusData avatar May 31 '26 12:05 DeusData

@DeusData is this released in 0.7.0 ?

I have the same issue:

Image

I tried to install it, after the quick install without ui failed too

C3ntraX avatar Jun 11 '26 15:06 C3ntraX

Okay, some more Info: I uninstalled, cleaned everything and installed the non ui version again (0.8.1) - same errror:

Image

Then I used the install command - same error:

Image

But somehow, the agent was added to the "msp.json"

Image Image

And it worked somehow?

C3ntraX avatar Jun 12 '26 07:06 C3ntraX

Thanks for the thorough follow-up and screenshots — and for retesting on 0.8.1. Will investigate the Windows install error path; the fact that the mcp.json entry lands correctly despite the error is a useful clue.

DeusData avatar Jun 12 '26 20:06 DeusData

Fixed. find_in_path now probes Windows PATHEXT variants (.exe/.cmd/.bat/.ps1) after the bare-name lookup, so the opencode launcher/shim is resolved and the install wires it correctly on Windows 11. Verified in Windows CI, and we've added a regression guard that places a fake opencode shim on PATH and asserts resolution.

Closing as fixed — please reopen if install still can't find opencode on a specific setup. Thanks for flagging it!

DeusData avatar Jun 26 '26 08:06 DeusData

I still get this error on 0.8.1 in windows 11

InformaticUniverse avatar Jun 29 '26 23:06 InformaticUniverse

I still get this error on 0.8.1 in windows 11

Same

pedrocastellanos avatar Jul 07 '26 20:07 pedrocastellanos

I still get this error on 0.9.0 in windows 11. Install opencode via npm Image

KnifeOfLife avatar Jul 08 '26 13:07 KnifeOfLife

Thanks for the fresh 0.9.0 confirmation. Keeping this reopened and moving it into the 0.9.1-rc train: Windows opencode detection/install still has at least one active failure path, especially for npm-installed opencode.

The next fix should distinguish the install source/shim shape rather than assuming PATHEXT probing is enough. Useful details for the remaining repro: Get-Command opencode | Format-List *, the exact install command used for codebase-memory-mcp, and whether the failing run is PowerShell, cmd, or Git Bash.

DeusData avatar Jul 08 '26 13:07 DeusData

Thanks for the fresh 0.9.0 confirmation. Keeping this reopened and moving it into the 0.9.1-rc train: Windows opencode detection/install still has at least one active failure path, especially for npm-installed opencode.

The next fix should distinguish the install source/shim shape rather than assuming PATHEXT probing is enough. Useful details for the remaining repro: Get-Command opencode | Format-List *, the exact install command used for codebase-memory-mcp, and whether the failing run is PowerShell, cmd, or Git Bash.

PowerShell 7.6.2

Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1 .\install.ps1

KnifeOfLife avatar Jul 08 '26 13:07 KnifeOfLife

Image Another error from PowerShell 7.6.4 Is there any prerequirement to install it? I currently use only lm studio + hermes agent for coding tasks.

Sevenhero avatar Aug 05 '26 07:08 Sevenhero

@Icaruk and everyone who has kept this alive — @ipatalas, @C3ntraX, @InformaticUniverse, @pedrocastellanos, @KnifeOfLife, @Sevenhero — this has been open since April, was closed as fixed, and then reconfirmed on 0.7.0, 0.8.1 and 0.9.0 across mise, scoop and npm installs. Closing it before any of you had confirmed was our mistake, and the PATHEXT probing we shipped clearly did not cover the shim shapes people actually have.

Between (gcm opencode).Source resolving to a .ps1 under mise, the scoop layout with no Apps-and-Features entry, and @KnifeOfLife's npm install with the exact PowerShell invocation, there is more than enough here to stop guessing and key the detection off the real install source rather than a name probe.

Tonight's v0.10.5 is being prepared for the issues that stop cbm being usable at all, and an installer that cannot wire up the agent you actually use belongs in that set. Thank you for the repeated retests — you have collectively exercised this on more Windows setups than we have.

DeusData avatar Aug 14 '26 17:08 DeusData

Thank you for the detailed follow-up, and for your patience while this stayed open.

Could you reproduce this once from the same PowerShell session where opencode works, then share the following? Please redact usernames or private path segments consistently, while preserving the shim extension, literal quoting, and whether relevant characters are non-ASCII.

  1. codebase-memory-mcp --version, the exact failing install command, and its complete output.
  2. Get-Command opencode -All | Select-Object CommandType,Name,Source,Path,Extension
  3. [Environment]::GetEnvironmentVariable('PATH','Process').Length
  4. $env:PATHEXT
  5. Only the raw PATH entry or entries containing the returned application path(s), with unrelated entries omitted.

That single capture will let us build a native-Windows regression around the actual install/detection path instead of guessing from the earlier short synthetic .cmd case.

DeusData avatar Aug 19 '26 19:08 DeusData

Thanks for the report! To move this forward we need a bit more so we can reproduce it ourselves:

  • the codebase-memory-mcp --version you're on
  • the exact steps or command you ran
  • a public repo (or a small dummy snippet) that shows the problem — please don't paste proprietary code

Once that's here we'll pick it straight back up. Heads-up: issues left awaiting-reporter are automatically closed after a few weeks of silence, but a comment reopens the door anytime.

github-actions[bot] avatar Aug 19 '26 20:08 github-actions[bot]

This issue has been waiting on more information for 21 days (a version, exact steps, or a public repro), so it's now marked stale. It will not be closed automatically — a maintainer reviews stale issues by hand. Adding a comment with the details clears the label and puts it straight back in the queue. We're happy to pick it back up the moment we can reproduce it.

github-actions[bot] avatar Sep 10 '26 02:09 github-actions[bot]

I can confirm it's working now, I installed it yesterday and it did recognize OpenCode (I didn't install it with mise, though).

cobrabr avatar Sep 12 '26 15:09 cobrabr

Thank you for retesting and for explicitly noting that your working installation does not use mise. That confirms the non-mise setup works for you, but does not establish that the original shim/PATH case is fixed. I have removed awaiting-reporter and am keeping this open for the original integration path rather than closing it on a different configuration. Thanks again for providing that distinction.

DeusData avatar Sep 19 '26 19:09 DeusData