anomalyco / anomalyco/opencode
[BUG]: DEP0169 url.parse() DeprecationWarning printed when a plugin is declared with a git spec
@neriousy is already working on this.
Since Sep 2, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Any command run in a project whose opencode.jsonc declares a plugin by git spec prints this to stderr:
(node:478340) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `opencode --trace-warnings ...` to show where the warning was created)
Cosmetic, but it appears on every run — in front of the user in a terminal and in the logs of anything running opencode as a service.
The trigger is git-spec resolution, not plugin loading in general. Running opencode models in a directory containing only an opencode.jsonc:
opencode.jsonc |
warning |
|---|---|
{} |
no |
{"plugin": ["github:Chi-teck/oc-agent-config#v1.0.1"]} |
yes |
{"plugin": ["git+https://github.com/Chi-teck/oc-mm-client.git#v0.2.0"]} |
yes |
{"plugin": ["opencode-scheduler"]} (npm name) |
no |
local .opencode/plugin/x.ts |
no |
Two unrelated plugins reproduce it identically, so it is not plugin code.
The shipped binary bundles pacote, npm-package-arg and hosted-git-info; one of those still calls legacy url.parse(). Node/Bun normally suppresses DEP0169 when the caller is inside node_modules — Bun's node:url shim guards it with isInsideNodeModules(4) — but in a single-file compiled executable nothing is inside node_modules, so a bundled dependency's call is reported as if it were first-party. opencode's own sources contain no url.parse, so the fix would be in the vendored spec-resolution stack, or suppressing DEP0169 in the bundle.
One side note: the remedy the message suggests is unreachable. opencode --trace-warnings is consumed by opencode's own argument parser and prints the help screen instead, and neither NODE_OPTIONS=--trace-warnings nor BUN_OPTIONS=--trace-warnings yields a stack. NODE_NO_WARNINGS=1 does suppress it, along with every other warning.
Plugins
github:Chi-teck/oc-agent-config, github:Chi-teck/oc-mm-client — but any git-spec plugin does it, including git+https:// ones.
OpenCode version
1.18.25
Steps to reproduce
mkdir /tmp/octest && cd /tmp/octestecho '{ "plugin": ["github:Chi-teck/oc-agent-config#v1.0.1"] }' > opencode.jsoncopencode models— the DEP0169 warning is printed to stderr before the output- Replace the plugin entry with an npm-name plugin, e.g.
"opencode-scheduler"— no warning
Operating System
Arch Linux, kernel 6.17.9 (opencode installed from the opencode Arch package)
Terminal
Konsole
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.