Repository navigation
Closed
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Description
OpenCode fails to install an npm plugin when proxy environment variables are present.
In my case, trying to load oh-my-openagent through the normal plugin spec caused OpenCode to attempt an npm install and fail with:
request to https://registry.npmjs.org/oh-my-openagent failed, reason: fetch() proxy.url must be a non-empty string
and later also:
request to https://registry.npmjs.org/zod/-/zod-4.3.6.tgz failed, reason: fetch() proxy.url must be a non-empty string
This happened while the shell environment had:
http_proxy=http://127.0.0.1:7897
https_proxy=http://127.0.0.1:7897
all_proxy=socks5://127.0.0.1:7897
The failure happens during OpenCode's plugin install path, not because the plugin package itself is bad.
A working workaround was to avoid the npm/plugin install path entirely and point OpenCode at a locally installed plugin directory instead of using a package spec.
So this looks like an upstream proxy handling bug in OpenCode's plugin install/npm fetch path.
Plugins
oh-my-openagent
OpenCode version
1.3.15
Steps to reproduce
- Set proxy environment variables, for example:
export http_proxy=http://127.0.0.1:7897 export https_proxy=http://127.0.0.1:7897 export all_proxy=socks5://127.0.0.1:7897
- Configure an npm-backed plugin in
~/.config/opencode/opencode.json, for example:{ "$schema": "https://opencode.ai/config.json", "plugin": ["oh-my-openagent"] } - Start
opencode - Observe plugin installation attempt in logs
- Observe failure fetching from
registry.npmjs.orgwith:fetch() proxy.url must be a non-empty string
Screenshot and/or share link
N/A
Operating System
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 GNU/Linux
Terminal
xterm-256color (WSL)
Reacted by Yanzhe Lee, Kaicheng Zhang, Gurvan, ZimaBlue, roy1994, johnsonsleo, CrazyPigHead, Rammiah, wmzy, orange-XD and 15 more
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Activity
HashTagGit commentedon Apr 5, 2026
meet the same problem in windows11
rijuyuezhu commentedon Apr 5, 2026
Same problem on archlinux with opencode 1.3.15; I think this might be a regression since the plugins worked well for me yesterday.
YanzheL commentedon Apr 5, 2026
Same issue here. Worked previously, but broken with latest 1.3.15 version
WSXYT commentedon Apr 5, 2026
Yes, I was surprised too—the Omo agent suddenly vanished. I was in the middle of installing a skill at the time, and I even wondered if the skill had caused some sort of injection or something.
willo0o commentedon Apr 5, 2026
same issue.
I workaround by this way
export no_proxy="registry.npmjs.org"; source ~/.bashrc && opencodewait opencode to install/load OmO plugin finished
then unset no_proxy and source ~/.bashrc, OmO still worked
YanzheL commentedon Apr 5, 2026
I can confirm that this issue starts with version
1.3.14.So I rollback to
1.3.13, and it works.GoldenBaozi commentedon Apr 6, 2026
same issue here on windows11 and opencode version 1.3.15, current workaround is to install plugins using
npm install <plugin> -g, then manually add the path of the index.js (typically in the dist/ directory in the package folder) to the "plugins" entry in opencode.jsonc, and the path may start with "file:///"Karuisawa-Mrs commentedon Apr 6, 2026
I hit this on Windows while trying to install/load
oh-my-openagentas an OpenCode plugin.Observed behavior:
opencode plugin oh-my-openagent@latest -g --forcefailed with:request to https://registry.npmjs.org/oh-my-openagent failed, reason: fetch() proxy.url must be a non-empty stringHTTP_PROXY / HTTPS_PROXY / http_proxy / https_proxywere all set tohttp://127.0.0.1:7890.Impact:
Workaround that fixed it locally:
C:\Users\Admin\.cache\opencode\packages\oh-my-openagent@latestnpm install [email protected] [email protected] [email protected]file:///C:/Users/Admin/.cache/opencode/packages/oh-my-openagent@latest/node_modules/oh-my-openagent/dist/index.jsAfter that:
opencode debug configresolved the plugin and its agents correctlyopencode run --agent 'Sisyphus (Ultraworker)' ...workedSo from this machine at least, the regression is consistent with a broken npm/plugin-install path under proxy handling, and using a direct local
file:///.../dist/index.jsplugin entry is an effective workaround.sad-apple commentedon Apr 7, 2026
Also encountering this issue on WSL2 with
http_proxy/https_proxyenvironment variables set. Same error:fetch() proxy.url must be a non-empty stringwhen opencode tries to install plugins at startup.Environment:
yu-zou commentedon Apr 7, 2026
Same issue for version 1.3.17
tongsh6 commentedon Apr 7, 2026
I can confirm this on Windows as well, and in my case it directly prevented
oh-my-openagent/Sisyphusfrom loading after upgrade.Environment
1.3.173.15.3HTTP_PROXY=http://127.0.0.1:7897HTTPS_PROXY=http://127.0.0.1:7897ALL_PROXY=http://127.0.0.1:7897NO_PROXY=localhost,127.0.0.1,::1What changed
This was working for me before I shut down 5 days ago.
After rebooting today and upgrading both OpenCode and oh-my-openagent, I could no longer use
Sisyphusdirectly.Reproduction
{ "$schema": "https://opencode.ai/config.json", "plugin": [ "oh-my-openagent@latest" ] }opencodeor run:Actual behavior
OpenCode tries to install the plugin at runtime and fails with:
Relevant logs:
After that, OpenCode falls back to the default built-in agent instead of the plugin-provided one.
For example:
Important observation
This does not look like an oh-my-openagent package problem.
I verified that if I bypass OpenCode's npm/plugin install path and point OpenCode to the already-installed local plugin directory, the plugin works again and the default agent becomes:
In my case, this local plugin path worked:
And with:
I get:
So the regression seems to be specifically in OpenCode's runtime plugin install / proxy handling path on Windows.
fix(npm): sanitize empty proxy env vars to prevent Bun fetch errors
linG5821 commentedon Apr 8, 2026
OpenCode 1.3.17 在Windows 上这对我有效, 我的 Sisyphus 又回来了
$env:no_proxy="registry.npmjs.org"
opencode plugin oh-my-openagent@latest -g
8 remaining items
cnbebop commentedon Apr 10, 2026
+1, same question
killerddd3 commentedon Apr 12, 2026
same as
zsynacl commentedon Apr 14, 2026
wonder how to do step 3: point the opencode plugin entry directly to local file
yiz-liu commentedon Apr 14, 2026
I solved this by manually installing the package into
~/.config/opencodeand~/.opencode, takeoh-my-openagentfor an example:Then replaced the plugin entry in OpenCode config from an npm spec (
oh-my-openagent@latest) to a local filesystem path:{ "$schema": "https://opencode.ai/config.json" "plugin": [ "~/.config/opencode/node_modules/oh-my-openagent" ] }red55 commentedon Apr 15, 2026
the same. opencode version 1.4.4
bakabird commentedon Apr 16, 2026
+1 same problem
rammiah commentedon Apr 18, 2026
please help with this issue!
rekram1-node commentedon Apr 20, 2026
This is kinda annoying, this bug is actually a bug in the bun runtime, ill see if I can apply a patch to one of the lower level packages to fix it before it gets to bun, im not sure exactly yet.
One of our maintainers actually has a PR to bun to fix it: oven-sh/bun#28902
rekram1-node commentedon Apr 20, 2026
Alr it seems like i can apply a patch to arborist to get around the issue
rekram1-node commentedon Apr 20, 2026
To those who hit this bug, you may need to
rm -rf ~/.cache/opencode/packages/Ill see if I can automate removing partially installed deps
codelonesomest commentedon Apr 28, 2026
Lol... desktop app is not loaded the oh-my-openagent agents but cli does
shigomany commentedon May 8, 2026
Same behaviour
316xu commentedon Jun 9, 2026
same with the newest version,win11 + ubuntu wsl
rekram1-node commentedon Jun 9, 2026
There was a regression, a package was bumped without updating the patch, it's fixed in dev will release later today