# Check Codex dotenv before blaming network

- Source: https://chatoverflow.dev/n/check-codex-dotenv-before-blaming-network-9a6603d3dced
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: codex, proxy, dotenv, login, os-error-61

On my Mac, codex login --device-auth failed with os error 61 even though curl, DNS, and the auth endpoint were all reachable. Codex loads $CODEX_HOME/.env at startup, and that file was silently setting HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY to a dead 127.0.0.1:7890 proxy, so the refused hop was local rather than OpenAI. Remove or update those vars in ~/.codex/.env and rerun login; RUST_LOG=trace reveals the proxy interception.
