Skip to content

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

Closed

Description

@Icaruk

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?

Activity

  1. DeusData commented on Apr 7, 2026

    @DeusData
    Owner

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

  2. added
    bugSomething isn't working
    windowsWindows-specific issues
    editor/integrationEditor compatibility and CLI integration
    on Apr 15, 2026
  3. ipatalas commented on Apr 16, 2026

    @ipatalas

    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.

  4. DeusData commented on May 31, 2026

    @DeusData
    Owner

    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. 🙏

  5. DeusData commented on May 31, 2026

    @DeusData
    Owner

    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!

  6. C3ntraX commented on Jun 11, 2026

    @C3ntraX

    @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

  7. C3ntraX commented on Jun 12, 2026

    @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?

  8. DeusData commented on Jun 12, 2026

    @DeusData
    Owner

    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.

  9. added a commit that references this issue on Jun 26, 2026
  10. 18 remaining items

  11. cobrabr commented on Sep 12, 2026

    @cobrabr

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

  12. removed
    staleNo activity after an info request; will be closed soon
    on Sep 13, 2026
  13. removed
    awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then close
    on Sep 19, 2026
  14. DeusData commented on Sep 19, 2026

    @DeusData
    Owner

    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.

  15. DeusData commented on Sep 26, 2026

    @DeusData
    Owner

    Thank you to everyone who kept retesting this across mise, scoop and npm installs! We found a concrete remaining cause, in two parts:

    1. The installer's PATH search copies %PATH% into a 4 KB buffer. When the process PATH is 4,096 characters or longer, which is common on Windows machines with many dev tools, the search skips the whole PATH instead of only the tail.
    2. The home-directory fallbacks cover only POSIX-style locations. They don't check %APPDATA%\npm, scoop shims or mise shims.

    That fits why it varies from machine to machine. We'll fix both. If you can, the output of [Environment]::GetEnvironmentVariable('PATH','Process').Length from an affected session would confirm the first part.

  16. wcy12378 commented on Sep 27, 2026

    @wcy12378
    Contributor

    Building on the 2026-09-26 root-cause analysis: submitted #2381 which (1) makes find_in_path duplicate PATH into a heap buffer sized to the real value instead of the fixed 4 KB stack copy, and (2) gives cbm_find_cli a Windows-aware fallback list (%APPDATA%\npm, %LOCALAPPDATA%\mise\shims, %USERPROFILE%\scoop\shims) with PATHEXT probing. Happy to adjust the exact shim dirs if your Windows CI prefers different layouts.

  17. DeusData commented on Oct 1, 2026

    @DeusData
    Owner

    Thank you, @wcy12378, for following up with #2381 and for responding to the review there. Linking it here as the current fix candidate so everyone following the Windows installer report can find the work. It is still open, so this issue stays open too; this is not a claim that the remaining setups are fixed. The newer validation questions and Windows CI rerun request on the PR still need maintainer follow-up. Thanks again to everyone who supplied the different install layouts.

  18. DeusData commented on Oct 25, 2026

    @DeusData
    Owner

    Thank you for the continued Windows install evidence and for #2381. The fix candidate needs maintainer follow-up on its outstanding validation; another generic PATHEXT retest would not add to the concrete shim/PATH cases already supplied. Keeping this open without claiming those remaining setups are fixed. Sorry for the delay—this is waiting on maintainer follow-up, and I’ll follow up soon.

  19. added a commit that references this issue on Oct 25, 2026
  20. DeusData commented on Oct 25, 2026

    @DeusData
    Owner

    The fix for both remaining causes is now on main in ced508f (#2381 - thank you, @wcy12378). The installer's PATH search now reads PATH at its real length instead of skipping the whole PATH once it passes 4,096 characters, and CLI detection now also probes %APPDATA%\npm, %LOCALAPPDATA%\mise\shims and %USERPROFILE%\scoop\shims, including .cmd, .exe, .bat and .ps1 shims. Both cases are covered by regression tests that run on every CI leg, Windows included. Thank you, @Icaruk, and everyone who kept retesting across mise, scoop and npm setups - those layouts are what pinned this down. The fix will be in the next release. If install still misses opencode on your machine after that, please comment here with the output of [Environment]::GetEnvironmentVariable('PATH','Process').Length and where opencode is installed, and we will reopen and pick it straight back up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.ux/behaviorDisplay bugs, docs, adoption UXwindowsWindows-specific issues

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions