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
{{ message }}
Repository navigation
Plugin install fails with valid proxy env: fetch() proxy.url must be a non-empty string #21468
When plugin is configured with a package name such as oh-my-openagent, OpenCode 1.4.0 fails during plugin installation on macOS with:
request to https://registry.npmjs.org/oh-my-openagent failed, reason: fetch() proxy.url must be a non-empty string
The proxy environment in the shell is valid. As a result the plugin is not loaded, custom agents are not registered, and OpenCode falls back to the default agent.
Environment
OpenCode: 1.4.0
OS: macOS
Node.js: v22.21.1
Bun: 1.3.6
Proxy env in shell:
http_proxy=http://127.0.0.1:7890
https_proxy=http://127.0.0.1:7890
Reproduction
Configure OpenCode with a package-name plugin entry:
{
"plugin": ["oh-my-openagent"]
}
Ensure the shell has valid proxy vars set, for example:
opencode --print-logs run --agent sisyphus "return exactly: plugin-check-ok"
Expected
OpenCode should install or load the plugin successfully and the sisyphus agent should be available.
Actual
OpenCode logs:
INFO service=plugin path=oh-my-openagent loading plugin
INFO service=npm pkg=oh-my-openagent@latest installing package
ERROR service=plugin pkg=oh-my-openagent version=latest error=request to https://registry.npmjs.org/oh-my-openagent failed, reason: fetch() proxy.url must be a non-empty string failed to install plugin
! agent "sisyphus" not found. Falling back to default agent
Additional checks
Reproduces even after explicitly source ~/.zshrc in a fresh zsh process.
Reproduces even when injecting npm_config_proxy and npm_config_https_proxy directly into the opencode command environment.
Shell proxy variables are present and non-empty.
Direct package usage via local filesystem path works immediately.
Workaround
Use a local filesystem path in the plugin array instead of the package name:
With the local path, sisyphus loads correctly and runs.
Question
It looks like the package-install code path is constructing or reading a proxy config object with an empty url, even though valid proxy env vars exist in the parent shell. Could you check the plugin installer proxy resolution logic in 1.4.0?
Please review those issues and consider whether your report adds new information or a different scenario. If so, please link to the related issues for context.
Activity
github-actions commentedon Apr 8, 2026
This issue might be a duplicate of existing issues. Please check:
Please review those issues and consider whether your report adds new information or a different scenario. If so, please link to the related issues for context.
github-actions commentedon Jul 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.