Description
I have been using opencode for quite some time now (and loving it!). When trying to upgrade to version 1.0.39 (and also just upgraded to 1.0.40), I get this error when opening opencode again. I also installed the opencode extension in my editor of choice zed.dev recently (which didn't seem to work). Maybe it's related, maybe not?
❯ opencode
Error: Unexpected error, check log file at /Users/zias/.local/share/opencode/log/2025-11-07T174508.log for more details
BunInstallFailedError: BunInstallFailedError
data: {
pkg: "opencode-copilot-auth",
version: "0.0.4",
},
at src/bun/index.ts:88:17
at processTicksAndRejections (native:7:39)
41 | code,
42 | stdout,
43 | stderr,
44 | })
45 | if (code !== 0) {
46 | throw new Error(Command failed with exit code ${result.exitCode})
^
error: Command failed with exit code 1
at run2 (src/bun/index.ts:46:13)
The logfile:
INFO 2025-11-07T17:45:08 +359ms service=default version=1.0.40 args=[] opencode
INFO 2025-11-07T17:45:08 +1ms service=project directory=/Users/zias fromDirectory
INFO 2025-11-07T17:45:08 +6ms service=config path=/Users/zias/.config/opencode/config.json loading
INFO 2025-11-07T17:45:08 +1ms service=config path=/Users/zias/.config/opencode/opencode.json loading
INFO 2025-11-07T17:45:08 +0ms service=config path=/Users/zias/.config/opencode/opencode.jsonc loading
INFO 2025-11-07T17:45:08 +1ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/zias/.config/opencode running
INFO 2025-11-07T17:45:08 +2ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/zias/.opencode running
INFO 2025-11-07T17:45:08 +22ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34)
stderr=Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionClosed downloading package manifest @opencode-ai/plugin
done
INFO 2025-11-07T17:45:08 +0ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34)
stderr=Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionClosed downloading package manifest @opencode-ai/plugin
done
INFO 2025-11-07T17:45:08 +2ms service=plugin [email protected] loading plugin
INFO 2025-11-07T17:45:08 +1ms service=bun pkg=opencode-copilot-auth version=0.0.4 installing package using Bun's default registry resolution
INFO 2025-11-07T17:45:08 +0ms service=bun cmd=["/Users/zias/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/zias/.cache/opencode","[email protected]"] cwd=/Users/zias/.cache/opencode running
INFO 2025-11-07T17:45:08 +11ms service=bun code=1 stdout=bun add v1.3.1 (89fa0f34)
stderr=InvalidNPMLockfile: failed to migrate lockfile: 'package-lock.json'
warn: Ignoring lockfile
Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionClosed downloading package manifest opencode-copilot-auth
done
ERROR 2025-11-07T17:45:08 +7ms service=default pkg=opencode-copilot-auth version=0.0.4 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 stack=BunInstallFailedError: BunInstallFailedError
at (src/bun/index.ts:88:17)
at processTicksAndRejections (native:7:39) fatal
The error message I get from the zed.dev extension: Internal error: "server shut down unexpectedly"
The opencode help command and some others do seem to work, but trying the opencode auth login fails after selecting any provider.
I have already tried removing all opencode configuration and fully uninstalled all caches, as well as reinstalled using homebrew, npm and the curl script. All seem to give the same issue. I am on a base model MacBook Air M2 using Ghostty.
OpenCode version
1.0.40 (latest at time of writing).
Steps to reproduce
- Install zed.dev opencode extension
- Upgrade opencode to latest version
- Unable to launch opencode.
Screenshot and/or share link
No response
Operating System
MacBook Air M2
Terminal
Ghostty