Codex Automations Cannot Resolve DNS / Access Network While Interactive Sessions Work

Open 💬 2 comments Opened May 9, 2026 by gfmarco

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.506.31421 (2620)

What subscription do you have?

Plus

What platform is your computer?

Darwin 25.3.0 arm64 arm

What issue are you seeing?

Codex Desktop interactive sessions can successfully access Azure DevOps over HTTPS, but Codex Automations consistently fail with DNS/network resolution errors for the same endpoints and same machine/environment.

Interactive execution works correctly:

bash curl -I https://dev.azure.com

returns:

txt HTTP/2 404

and authenticated Azure DevOps API requests also succeed:

bash curl -v \ -u :$AZDO_PAT \ "https://dev.azure.com/YanbalInternational/SPY/_apis/git/repositories?api-version=7.1"

returns:

txt HTTP/2 200

The same Python script also works when manually executed from Codex interactive mode:

bash AZDO_HTTP_CLIENT=urllib ./.venv/bin/python azure_devops_pr_report.py

However, when the same command is executed from a Codex Automation, it fails with DNS/network errors.

Observed errors:

txt curl: (6) Could not resolve host: dev.azure.com

txt <urlopen error [Errno 8] nodename nor servname provided, or not known>

This appears to be a runtime inconsistency between:

  • Codex interactive execution
  • Codex Automation execution

What steps can reproduce the bug?

  1. Configure Codex Desktop with:

toml [sandbox_workspace_write] network_access = true

  1. Create a Python script that accesses:

txt https://dev.azure.com

  1. Verify the following works interactively inside Codex Desktop:

bash curl -I https://dev.azure.com

  1. Verify the Python script also works interactively:

bash AZDO_HTTP_CLIENT=urllib ./.venv/bin/python azure_devops_pr_report.py

  1. Create a Codex Automation that runs the exact same command:

bash AZDO_HTTP_CLIENT=urllib ./.venv/bin/python azure_devops_pr_report.py

  1. Observe that the Automation fails with DNS/network errors even though the exact same command succeeds interactively.

Diagnostic output from the Automation:

txt curl: (6) Could not resolve host: dev.azure.com

txt socketGetaddrinfoError: gaierror(8, 'nodename nor servname provided, or not known')

Environment:

  • macOS Apple Silicon
  • Python 3.13.7
  • Codex Desktop
  • Virtual environment (.venv)

What is the expected behavior?

Codex Automations should have the same DNS/network behavior as interactive Codex sessions when:

toml [sandbox_workspace_write] network_access = true

is configured.

The exact same command should:

  • resolve DNS correctly
  • connect to external HTTPS endpoints
  • behave consistently between interactive and automation runtimes

Expected result:

  • Azure DevOps API calls succeed
  • DNS resolution works normally
  • Python urllib and curl both work inside Automations

Additional information

This does not appear to be:

  • an invalid PAT
  • invalid Azure DevOps organization
  • invalid URL
  • Python dependency issue
  • missing curl
  • local firewall issue

because:

  • all requests succeed interactively on the same machine
  • authenticated Azure DevOps API calls return HTTP 200 manually
  • only Automations fail

The Automation diagnostics file shows:

json { "httpClient": "urllib", "environment": { "AZDO_HTTP_CLIENT": "urllib", "AZDO_ORG": "YanbalInternational" }, "probes": { "socketGetaddrinfoError": "gaierror(8, 'nodename nor servname provided, or not known')", "curlHead": { "exitCode": 6, "stderr": "curl: (6) Could not resolve host: dev.azure.com" } } }

This strongly suggests that Codex Automations are running in a different network/DNS sandbox than interactive sessions.

Additional finding:

If I open a new Codex chat and ask it to locate and run the paused automation manually, it works successfully.

The new chat was able to:

bash rg --files "$HOME/.codex/automations" -g 'automation.toml' -g '*.toml'

find:

txt /Users/mgarate/.codex/automations/reporte-prs-azure-devops/automation.toml

then execute the script from the original workspace:

bash cd /Users/mgarate/Documents/Codex/2026-05-01/hola-quiero-hacer-una-automatizacion-donde && ./.venv/bin/python azure_devops_pr_report.py

This completed successfully:

txt Reporte guardado en reports/latest-pr-report.md Correo enviado por Mail.app a marcoantonio.garate@yanbal.com

So the issue appears to be specifically with the scheduled/background Automation runtime, not with:

  • the script
  • Azure DevOps credentials
  • local network
  • Codex interactive execution
  • the virtual environment
  • Mail.app delivery

In short:

txt Scheduled Automation run: DNS/network failure Manual execution from a fresh Codex chat: succeeds

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗