Repository navigation
Description
Description
Summary
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:7890https_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:
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890- Run:
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 ~/.zshrcin a fresh zsh process. - Reproduces even when injecting
npm_config_proxyandnpm_config_https_proxydirectly into theopencodecommand 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:
{
"plugin": ["/Users/.../.cache/opencode/node_modules/oh-my-openagent"]
}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?
Plugins
oh-my-openagent
OpenCode version
1.4.0
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
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.