anomalyco / anomalyco/opencode

Compiled binary ignores NODE_OPTIONS dns-result-order and often NO_PROXY

Open
#47,041 2 comments 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 3, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Summary

The compiled OpenCode binary (Bun) ignores NODE_OPTIONS=--dns-result-order=ipv4first. It also often ignores NO_PROXY when HTTP_PROXY/ALL_PROXY are set, so loopback HTTP backends get sent through CONNECT.

Repro

  1. Dual-stack DNS where AAAA is unusable and A works.
  2. NODE_OPTIONS=--dns-result-order=ipv4first opencode run against https://gateway.example/v1.
  3. Alternatively set HTTPS_PROXY=http://127.0.0.1:PORT, NO_PROXY=127.0.0.1, HTTP_PROXY/ALL_PROXY to the same proxy, and call http://127.0.0.1:OTHER/v1.

Actual

Compiled binary still uses AAAA (or sends loopback through CONNECT). Node/bun scripts with the same env work.

Expected

Honor NODE_OPTIONS DNS order, or document that compiled builds do not. Honor NO_PROXY for loopback even when ALL_PROXY is set.

Suggested fix

Compile with Bun env-proxy plus dns-result-order support, or document the limitation in CLI networking docs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.