You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO 2025-06-25T09:09:30 +45ms service=default version=0.1.133 args=run,Explain,the,use,of,context,in,Go opencode
INFO 2025-06-25T09:09:30 +1ms service=app cwd=/Users/zheng-cheng/Documents/MiraclePlus/mp creating
INFO 2025-06-25T09:09:30 +6ms service=app git=/Users/zheng-cheng/Documents/MiraclePlus/mp git
INFO 2025-06-25T09:09:30 +2ms service=app name=share registering service
INFO 2025-06-25T09:09:30 +0ms service=bus type=storage.write subscribing
INFO 2025-06-25T09:09:30 +0ms service=app name=bus registering service
INFO 2025-06-25T09:09:30 +2ms service=session id=ses_859a6870affe2vKYl9mgW0nV1P version=0.1.133 title=New Session - 2025-06-25T09:09:30.998Z time=[object Object] created
INFO 2025-06-25T09:09:30 +0ms service=app name=session registering service
INFO 2025-06-25T09:09:30 +0ms service=app name=storage registering service
INFO 2025-06-25T09:09:30 +0ms service=storage path=/Users/zheng-cheng/.local/share/opencode/project/Users-zheng-cheng-Documents-MiraclePlus-mp/storage init
INFO 2025-06-25T09:09:30 +1ms service=bus type=storage.write publishing
INFO 2025-06-25T09:09:30 +0ms service=app name=config registering service
INFO 2025-06-25T09:09:31 +2ms service=config loaded
INFO 2025-06-25T09:09:31 +0ms service=bus type=session.updated publishing
INFO 2025-06-25T09:09:31 +0ms service=app name=provider registering service
INFO 2025-06-25T09:09:31 +2ms service=models.dev refreshing
INFO 2025-06-25T09:09:31 +1ms service=provider init
ERROR 2025-06-25T09:09:31 +14ms service=default fatal
INFO 2025-06-25T13:57:50 +33ms service=default version=0.1.135 args=run,hi opencode
INFO 2025-06-25T13:57:50 +2ms service=app cwd=/Users/zheng-cheng/Desktop/cursor_for_qiji creating
INFO 2025-06-25T13:57:50 +0ms service=app git=/Users/zheng-cheng/Desktop/cursor_for_qiji git
INFO 2025-06-25T13:57:50 +1ms service=app name=share registering service
INFO 2025-06-25T13:57:50 +0ms service=bus type=storage.write subscribing
INFO 2025-06-25T13:57:50 +0ms service=app name=bus registering service
INFO 2025-06-25T13:57:50 +1ms service=session id=ses_8589e8e3cffedzb74m1h6AUpW8 version=0.1.135 title=New Session - 2025-06-25T13:57:50.659Z time=[object Object] created
INFO 2025-06-25T13:57:50 +0ms service=app name=session registering service
INFO 2025-06-25T13:57:50 +0ms service=app name=storage registering service
INFO 2025-06-25T13:57:50 +0ms service=storage path=/Users/zheng-cheng/.local/share/opencode/project/Users-zheng-cheng-Desktop-cursor_for_qiji/storage init
INFO 2025-06-25T13:57:50 +1ms service=bus type=storage.write publishing
INFO 2025-06-25T13:57:50 +0ms service=app name=config registering service
INFO 2025-06-25T13:57:50 +1ms service=config loaded
INFO 2025-06-25T13:57:50 +0ms service=bus type=session.updated publishing
INFO 2025-06-25T13:57:50 +0ms service=app name=provider registering service
INFO 2025-06-25T13:57:50 +2ms service=models.dev refreshing
INFO 2025-06-25T13:57:50 +0ms service=provider init
ERROR 2025-06-25T13:57:50 +6ms service=default fatal
Quick fix for people running into this issue and want to continue using opencode: In the folder ~/.local/share/opencode, delete package.json or the whole folder
Example: rm -rf ~/.local/share/opencode/package.json or ~/.local/share/opencode
--
@thdxr I've ran this locally and located the primary issue here:
I'm preparing a PR to update error handling for these cases.
Here's a rough analysis of actual issue. I started checking out packages/opencode/src/bun/index.ts (BunProc)'s install function, where it detects @aws-sdk/credential-providers already within the package.json file, it thus skips installation the installation. But it's not actually installed in the node_modules folder of the cache dir.
After that, I tried always installing all packages (essentially removing the check if it's listed in package.json), that causes issues with the BunProc's run, function because how we read stdout and stdin is broken.
Once that is fixed, the following problem happened for me, somehow, also "amazon-bedrock" is listed for me as dependencies in the cache package.json file, but this package doesn't exist, which causes the installation to occur:
INFO 2025-06-27T15:21:53 +2ms service=bun cmd=/home/wmisiedjan/.bun/bin/bun,install,--registry=https://registry.npmjs.org cwd=/home/wmisiedjan/.cache/opencode running
INFO 2025-06-27T15:21:53 +60ms service=bun code=1 stdout=bun install v1.2.17 (282dda62)
stderr=Resolving dependencies
Resolved, downloaded and extracted [1]
error: GET https://registry.npmjs.org/amazon-bedrock - 404
error: amazon-bedrock@latest failed to resolve
done
ERROR 2025-06-27T15:21:53 +1ms service=default pkg=@aws-sdk/credential-providers version=latest name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 fatal
Likely cause is in that there was some mistake in earlier versions that caused the state of the cache's package.json to be broken, this also uncovered a couple of other bugs mentioned above.
We need strategy to how we deal with a broken package.json state / cache, e.g. automatically delete when broken state occurs, a clean command or something along those lines.
Activity
1c7 commentedon Jun 25, 2025
Hi, I am trying to run OpenCode in my macbook, it doesn't work and I can't figure out why, the error log is not helping
1c7 commentedon Jun 25, 2025
~/.local/share/opencode/auth.json1c7 commentedon Jun 25, 2025
cravenceiling commentedon Jun 25, 2025
Try again after upgrading opencode. Do you have a
config.jsonoropencode.jsonfile?1c7 commentedon Jun 25, 2025
Latest version is 0.1.135
I am using Warp 2.0 terminal
Thank you for reply! I don't have
config.jsonoropencode.jsonfile1c7 commentedon Jun 25, 2025
it still output error message
/Users/zheng-cheng/.local/share/opencode/log/2025-06-25T135750.log1c7 commentedon Jun 25, 2025
thdxr commentedon Jun 25, 2025
what is the result of
opencode models1c7 commentedon Jun 26, 2025
1c7 commentedon Jun 26, 2025
just error and nothing else
ItsWendell commentedon Jun 26, 2025
Similar issue here on Linux (Fedora), running latest version (0.1.140).
opencode --version-> Works: 0.1.140opencode models-> Erroropencode-> ErrorLogs:
Relevant environment variables set:
PATH=/home/[HIDDEN]/.opencode/bin:$PATHthdxr commentedon Jun 26, 2025
hm this is really weird - is it possible for you to run the repo locally and dig in more?
thdxr commentedon Jun 26, 2025
it's failing some point after the provider.ts init
1c7 commentedon Jun 27, 2025
is it possible the bug relate to network / proxy?
I am in Guangzhou China, we use VPN (shadowsocks, Clash etc) to visit Google/Youtube/Github etc.
I have HTTP proxy running at port 1087 and set env variable like this
1c7 commentedon Jun 27, 2025
somehow it works on my 2022 Macbook Air(M2 chip with 24G memory),
but not macbook pro(M1 Pro chip with 16G memory)
1c7 commentedon Jun 27, 2025
is there verbose mode I can enable?
--verbosecravenceiling commentedon Jun 27, 2025
You can use
--print-logsto get more info when running opencode.ItsWendell commentedon Jun 27, 2025
Quick fix for people running into this issue and want to continue using
opencode: In the folder~/.local/share/opencode, deletepackage.jsonor the whole folderExample:
rm -rf ~/.local/share/opencode/package.jsonor~/.local/share/opencode--
@thdxr I've ran this locally and located the primary issue here:
I'm preparing a PR to update error handling for these cases.
Here's a rough analysis of actual issue. I started checking out
packages/opencode/src/bun/index.ts(BunProc)'sinstallfunction, where it detects@aws-sdk/credential-providersalready within the package.json file, it thus skips installation the installation. But it's not actually installed in the node_modules folder of the cache dir.After that, I tried always installing all packages (essentially removing the check if it's listed in package.json), that causes issues with the BunProc's
run, function because how we read stdout and stdin is broken.We can fix that by doing the following instead:
Once that is fixed, the following problem happened for me, somehow, also "amazon-bedrock" is listed for me as dependencies in the cache package.json file, but this package doesn't exist, which causes the installation to occur:
Likely cause is in that there was some mistake in earlier versions that caused the state of the cache's package.json to be broken, this also uncovered a couple of other bugs mentioned above.
We need strategy to how we deal with a broken package.json state / cache, e.g. automatically delete when broken state occurs, a clean command or something along those lines.
ItsWendell commentedon Jun 27, 2025
The following PR improves error handling and the parsing of stdout / stdin:
We still need a solution for resolving broken cache package.json files, @thdxr woud love to hear your thoughts on this.
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Merge pull request anomalyco#387 from affaan-m/codex/fix-386-observer…
feat(openwrk): download sidecars on demand (anomalyco#387)