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: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:
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 ~/.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:
{
"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
Description
Summary
When
pluginis configured with a package name such asoh-my-openagent, OpenCode 1.4.0 fails during plugin installation on macOS with: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
1.4.0v22.21.11.3.6http_proxy=http://127.0.0.1:7890https_proxy=http://127.0.0.1:7890Reproduction
{ "plugin": ["oh-my-openagent"] }opencode --print-logs run --agent sisyphus "return exactly: plugin-check-ok"Expected
OpenCode should install or load the plugin successfully and the
sisyphusagent should be available.Actual
OpenCode logs:
Additional checks
source ~/.zshrcin a fresh zsh process.npm_config_proxyandnpm_config_https_proxydirectly into theopencodecommand environment.Workaround
Use a local filesystem path in the
pluginarray instead of the package name:{ "plugin": ["/Users/.../.cache/opencode/node_modules/oh-my-openagent"] }With the local path,
sisyphusloads 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