codex - 💡(How to fix) Fix Windows Desktop: sandboxed shell can resolve and ping LAN host but HTTP/TCP connection fails [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21029Fetched 2026-05-05 05:54:13
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Timeline (top)
labeled ×5

Error Message

From normal Windows PowerShell outside Codex:

Root Cause

Hostnames and IPs are intentionally sanitized because this is an internal production LAN service.

Code Example

Invoke-WebRequest http://internal-app.local

---

StatusCode        : 200
StatusDescription : OK

---

Resolve-DnsName internal-app.local

---

Test-Connection internal-app.local -Count 1

---

Invoke-WebRequest http://internal-app.local

---

Unable to connect to the remote server
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using?

Unknown / can provide if needed.

What platform is your computer?

Windows desktop app.

What issue are you seeing?

Codex Desktop's shell/tool environment can resolve and ping an internal LAN host, but cannot establish HTTP/TCP connections to it. The same URL works from the browser and from normal PowerShell on the same Windows machine.

This appears specific to Codex's sandbox/helper process rather than DNS or the internal service itself.

Observed behavior

From normal Windows PowerShell outside Codex:

Invoke-WebRequest http://internal-app.local

returns:

StatusCode        : 200
StatusDescription : OK

From inside Codex Desktop's shell tool:

Resolve-DnsName internal-app.local

succeeds and returns a LAN address.

Test-Connection internal-app.local -Count 1

also succeeds.

But:

Invoke-WebRequest http://internal-app.local

fails with:

Unable to connect to the remote server

Direct HTTP to the resolved LAN IP and app port also fails from Codex with the same connection failure.

Expected behavior

If the shell/tool environment is permitted to use network access, Codex should be able to make the same LAN HTTP/TCP request that browser and normal PowerShell can make from the same Windows machine.

Why this looks like a Codex sandbox/network issue

  • Browser on the same machine can reach the internal app.
  • Normal PowerShell on the same machine can reach the internal app.
  • Codex can resolve the hostname.
  • Codex can ping the host.
  • Codex cannot open HTTP/TCP to that host.
  • This reportedly worked from Codex Desktop last week with the same internal service configuration.

Notes

Hostnames and IPs are intentionally sanitized because this is an internal production LAN service.

extent analysis

TL;DR

The issue is likely due to Codex's sandbox environment restricting network access, and a workaround may involve configuring Codex to allow HTTP/TCP connections to internal LAN hosts.

Guidance

  • Verify that Codex's network settings or sandbox configuration are not blocking HTTP/TCP connections to internal LAN hosts.
  • Check if there are any recent updates or changes to Codex's configuration that may have caused this issue, as it reportedly worked last week.
  • Attempt to use the resolved LAN IP address and port in the Invoke-WebRequest command to rule out any DNS-related issues.
  • Investigate Codex's documentation or support resources for any known issues or workarounds related to network access and sandbox environments.

Example

No code snippet is provided as it is not necessary for this issue, but an example of using the resolved LAN IP address and port in the Invoke-WebRequest command would be:

Invoke-WebRequest http://<resolved_lan_ip>:<port>

Replace <resolved_lan_ip> and <port> with the actual values.

Notes

The issue seems to be specific to Codex's sandbox environment, and resolving the issue may require configuring Codex to allow network access or updating its configuration.

Recommendation

Apply a workaround by configuring Codex to allow HTTP/TCP connections to internal LAN hosts, as it is likely a restriction in the sandbox environment that is causing the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If the shell/tool environment is permitted to use network access, Codex should be able to make the same LAN HTTP/TCP request that browser and normal PowerShell can make from the same Windows machine.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING