Skip to content

1.0.153 doesn't seem to work on windows #5556

Closed

Description

@BitTuner-Jack

Description

When I try to update to the latest version (1.0.153), I can't start opencode and report the following error:

➜  ~ npm install -g opencode-ai

added 1 package in 17s
➜  ~ opencode
It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing the "opencode-windows-x64" package
➜  ~ ✗ npm uninstall -g opencode-ai

removed 1 package in 867ms
➜  ~ npm cache clean --force
npm warn using --force Recommended protections disabled.
➜  ~ npm install -g opencode-ai@1.0.152

added 3 packages in 9s
➜  ~ opencode
➜  ~

After version 1.0.152, it's working. Please check! Thanks.

OpenCode version

1.0.152

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 15, 2025
  2. github-actions commented on Dec 15, 2025

    @github-actions
    Contributor

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

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

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 15, 2025
  4. self-assigned this
    on Dec 15, 2025
  5. wisemanny commented on Dec 15, 2025

    @wisemanny

    I am on Windows on Arm and use version 1.0.152, so that may be additional complication, but since about a week or a bit more ago, opencode get stuck. I run it, it may or may not show the prompt screen and then would quit leaving the terminal in a state, that when I move mouse, wt would print control symbols. I tried all options such as disable autoupdate. No matter how I tried to pass the --log-level DEBUG it never worked. The logs contain only INFO messages. Still I noticed that the last one was related to formatters. I disabled them as well as automates and opencode works now:

    ❯ cat C:\Users\xxxx\.config\opencode\opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "autoupdate": false,
      "formatter": false
    }
    

    Here is how logs looked like:

    INFO  2025-12-15T15:28:00 +0ms service=server status=started method=GET path=/mcp request
    INFO  2025-12-15T15:28:00 +1ms service=server status=completed duration=0 method=GET path=/mcp request
    INFO  2025-12-15T15:28:00 +0ms service=server method=GET path=/formatter request
    INFO  2025-12-15T15:28:00 +0ms service=server status=started method=GET path=/formatter request
    INFO  2025-12-15T15:28:00 +15ms service=server method=GET path=/session/status request
    INFO  2025-12-15T15:28:00 +0ms service=server status=started method=GET path=/session/status request
    INFO  2025-12-15T15:28:00 +1ms service=server status=completed duration=1 method=GET path=/session/status request
    INFO  2025-12-15T15:28:00 +0ms service=server method=GET path=/provider/auth request
    INFO  2025-12-15T15:28:00 +0ms service=server status=started method=GET path=/provider/auth request
    INFO  2025-12-15T15:28:00 +1ms service=server status=completed duration=1 method=GET path=/provider/auth request
    INFO  2025-12-15T15:28:00 +1ms service=server method=GET path=/vcs request
    INFO  2025-12-15T15:28:00 +0ms service=server status=started method=GET path=/vcs request
    INFO  2025-12-15T15:28:00 +0ms service=server status=completed duration=0 method=GET path=/vcs request
    INFO  2025-12-15T15:28:00 +1ms service=server method=GET path=/path request
    INFO  2025-12-15T15:28:00 +0ms service=server status=started method=GET path=/path request
    INFO  2025-12-15T15:28:00 +1ms service=server status=completed duration=1 method=GET path=/path request
    INFO  2025-12-15T15:28:00 +3ms service=server status=completed duration=28 method=GET path=/session request
    INFO  2025-12-15T15:28:00 +46ms service=server status=completed duration=69 method=GET path=/formatter request
    

    ^ this was the last message, that is why I decided to disable formatters.

    So separately, if there is another way to turn on DEBUG logs except like using cmd line, it would help with better debugging.

    P.S. It seems to me like there is some race condition going on and me disabling formatters just impacted the time for the server to do something. I noticed that sometimes it will start, other times it will stuck and then quit, but if I add --log-level DEBUG it will start OK. So feels like server is crashing for some reason and TUI quits.

    P.S.S Just upgraded to 154 and same issue again. Black screen and in 3-4 seconds, it quits back to the terminal. It does not even show the prompt screen. These are the last log messages:

    INFO  2025-12-15T16:34:41 +2ms service=provider status=started state
    INFO  2025-12-15T16:34:41 +2ms service=server event connected
    INFO  2025-12-15T16:34:41 +5ms service=bus type=* subscribing
    INFO  2025-12-15T16:34:41 +4ms service=models.dev file={} refreshing
    INFO  2025-12-15T16:34:41 +2ms service=models.dev file={} refreshing
    INFO  2025-12-15T16:34:41 +4ms service=server status=completed duration=554 method=GET path=/event request
    INFO  2025-12-15T16:34:41 +0ms service=server status=completed duration=555 method=GET path=/config request
    INFO  2025-12-15T16:34:41 +3ms service=server status=completed duration=559 method=GET path=/agent request
    INFO  2025-12-15T16:34:41 +41ms service=provider init
    
  6. BitTuner-Jack commented on Dec 16, 2025

    @BitTuner-Jack
    Author

    This issue still exists in version 1.0.162, please check! thanks @rekram1-node

  7. rekram1-node commented on Dec 16, 2025

    @rekram1-node
    Contributor

    are u on wsl? or windows

  8. BitTuner-Jack commented on Dec 16, 2025

    @BitTuner-Jack
    Author

    are u on wsl? or windows

    windows, powershell 7

  9. wisemanny commented on Dec 16, 2025

    @wisemanny

    I am on windows (not wsl), pwsh as well, but to remind, I am on aarch64 windows using x64 opencode through Prism emulation. Till about 1-2 weeks ago it all worked fine.

  10. BitTuner-Jack commented on Dec 16, 2025

    @BitTuner-Jack
    Author

    I’m using an AMD64 Windows, and currently I can only use version 1.0.152 of the opencode. After trying to update the package using npm update, I encounter an error that says: “It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing the ‘opencode-windows-x64’ package.” It seems that I could manually download the package, place it in the appropriate directory within npm, and then change the version number accordingly, but that would be quite troublesome.

  11. rekram1-node commented on Dec 16, 2025

    @rekram1-node
    Contributor

    yeah interesting, im really confused one what could have caused it, only notable thing I recall was upgrading bun version from 1.3.3 -> 1.3.4 but ill keep looking.

    Weird only you two so far reporting this

  12. wisemanny commented on Dec 16, 2025

    @wisemanny

    btw it is the server part that is crashing(?). Here is I tried to run it via web and what happens that after about 12 seconds the process quits (I did not open web page):

    ~ via 🥟
    ❯ opencode --log-level DEBUG --print-logs serve
    INFO 2025-12-16T15:30:36 +528ms service=default version=1.0.154 args=["--log-level","DEBUG","--print-logs","serve"] opencode
    opencode server listening on http://127.0.0.1:50732

    ~ via 🥟 took 12s
    ❯ echo $LASTEXITCODE
    -1073741819

    ~ via 🥟
    ❯ '{0:X}' -f $LASTEXITCODE
    C0000005

  13. wisemanny commented on Dec 16, 2025

    @wisemanny

    Sometimes I see such errors in the log:

    INFO 2025-12-16T15:41:50 +0ms service=format init
    INFO 2025-12-16T15:41:50 +0ms service=bus type=file.edited subscribing
    INFO 2025-12-16T15:41:50 +0ms service=lsp serverIds=deno, typescript, vue, eslint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, sourcekit-
    INFO 2025-12-16T15:41:50 +1ms service=bus type=command.executed subscribing
    ERROR 2025-12-16T15:41:50 +10ms service=acp-command promise={} reason=No such file or directory: '' Unhandled rejection
    ERROR 2025-12-16T15:41:50 +1ms service=default e=No such file or directory: '' rejection

    INFO 2025-12-16T15:41:50 +208ms service=server status=completed duration=578 method=GET path=/session request
    INFO 2025-12-16T15:42:02 +11985ms service=server method=GET path=/session request
    INFO 2025-12-16T15:42:02 +0ms service=server status=started method=GET path=/session request
    INFO 2025-12-16T15:42:02 +1ms service=default directory=C:\tools creating instance
    INFO 2025-12-16T15:42:02 +1ms service=project directory=C:\tools fromDirectory
    INFO 2025-12-16T15:42:02 +3ms service=server method=PATCH path=/project/8ef03dfcc48c9b196a2963070fb9bee549644ad0 request
    INFO 2025-12-16T15:42:02 +0ms service=server status=started method=PATCH path=/project/8ef03dfcc48c9b196a2963070fb9bee549644ad0 request
    INFO 2025-12-16T15:42:02 +10ms service=server method=GET path=/project/current request

    and a bit later

    INFO 2025-12-16T15:42:03 +0ms service=provider providerID=opencode found
    INFO 2025-12-16T15:42:03 +1ms service=provider status=completed duration=17 state
    INFO 2025-12-16T15:42:03 +18ms service=server status=completed duration=393 method=GET path=/provider request
    INFO 2025-12-16T15:42:03 +18ms service=vcs branch=master initialized
    INFO 2025-12-16T15:42:03 +0ms service=bus type=file.watcher.updated subscribing
    ERROR 2025-12-16T15:42:03 +73ms service=acp-command promise={} reason=Invalid handle Unhandled rejection
    ERROR 2025-12-16T15:42:03 +1ms service=default e=Invalid handle rejection

    INFO 2025-12-16T15:42:10 +6881ms service=server status=completed duration=7032 method=GET path=/file/status request
    INFO 2025-12-16T15:42:10 +55ms service=server method=GET path=/find/file request
    INFO 2025-12-16T15:42:10 +1ms service=server status=started method=GET path=/find/file request
    INFO 2025-12-16T15:42:10 +4ms service=file query= search
    INFO 2025-12-16T15:42:10 +28ms service=server status=completed duration=32 method=GET path=/find/file request
    INFO 2025-12-16T15:42:21 +11625ms service=server global event disconnected

    How can I turn on DEBUG logging? For some reason it does not work through a cmd param. I tried using the bun's bundle exe file and not the bun's shim, still no luck with it doing DEBUG logging. Example, but it prints only INFO ones:

    ❯ ~.bun\install\global\node_modules\opencode-windows-x64-baseline\bin\opencode.exe --log-level DEBUG --print-logs serve
    INFO 2025-12-16T15:46:41 +482ms service=default version=1.0.154 args=["--log-level","DEBUG","--print-logs","serve"] opencode
    opencode server listening on http://127.0.0.1:50673
    INFO 2025-12-16T15:46:50 +8651ms service=server method=GET path=/ request
    INFO 2025-12-16T15:46:50 +0ms service=server status=started method=GET path=/ request

    btw C0000005 is Access Violation. Maybe I need to try another version of bun?

  14. rekram1-node commented on Dec 16, 2025

    @rekram1-node
    Contributor

    Hm for C0000005 does bun/node itself not have proper permissions on your system? I don't think it'd be openocde it seems like it was maybe installed without full permissions

  15. BitTuner-Jack commented on Dec 16, 2025

    @BitTuner-Jack
    Author

    “It seems that your package manager failed to install the correct version of the opencode CLI for your platform. You can try manually installing the ‘opencode-windows-x64’ package.”

    Hi, I have resolved the issue; it was likely due to an incomplete or missing synchronization from the npm mirror repository. After resetting to the official default repository (https://registry.npmjs.org/), the update was successful, and everything is working properly now. Thanks!

  16. rekram1-node commented on Dec 16, 2025

    @rekram1-node
    Contributor

    Nice!

  17. rekram1-node commented on Dec 16, 2025

    @rekram1-node
    Contributor

    @wisemanny I think your issue is probably different, I am going to close this since OP got addressed but I will continue convo here w/ you or wherever you'd prefer to get it addressed

    We can open separate issue, or discuss via dms, or discuss here

  18. wisemanny commented on Dec 21, 2025

    @wisemanny

    I realized I did not reply. Thanks, but I switched to WSL version. I think that x64 crashes because of emulation, I looked at the issue under WinDbg and it did not make too much sense, except that there are some additional layers of stack frames and other work. So I suppose I better wait for arm64 build for Windows, and in the meantime use WSL, it works good.

    @wisemanny I think your issue is probably different, I am going to close this since OP got addressed but I will continue convo here w/ you or wherever you'd prefer to get it addressed

    We can open separate issue, or discuss via dms, or discuss here

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions