Skip to content

Codex Browser blocks allowlisted localhost with enterprise network policy error #33580

Open

Description

@Jupiter363

Summary

Codex desktop Browser rejects http://localhost:5173/ with an enterprise network policy error even though the local Browser allowlist contains the exact origin.

This blocks local frontend E2E testing in the Codex in-app Browser. The app reports that the action is blocked by enterprise network policy and also forbids using another address or browser as a workaround.

Environment

  • OS: Windows
  • Codex desktop package: OpenAI.Codex 26.707.12708.0
  • Codex CLI: codex-cli 0.144.5
  • Browser surface: Codex In-app Browser (iab)
  • Local app URL: http://localhost:5173/

Local Browser config

C:\Users\Jupiter\.codex\browser\config.toml contains:

approval_mode = "never_ask"
full_cdp_access_enabled = true

[origins]
allowed = [ "http://localhost:5173", "http://127.0.0.1:5173", "https://localhost:5170" ]
denied = []

[downloads]
allowed = [ "http://127.0.0.1:5173", "http://localhost:5173", "https://localhost:5170" ]
denied = []

[uploads]
allowed = [ "http://127.0.0.1:5173", "http://localhost:5173", "https://localhost:5170" ]
denied = []

[full_cdp]
allowed = [ "http://127.0.0.1:5173", "http://localhost:5173", "https://localhost:5170" ]
denied = []

The active Browser session config also contains:

[origins]
allowed = [
    "http://localhost:5173",
    "http://127.0.0.1:5173",
]

Managed policy files checked locally

The following local managed policy files/directories do not exist on the machine:

  • C:\ProgramData\OpenAI\Codex\requirements.toml
  • C:\ProgramData\OpenAI\Codex\managed_config.toml
  • C:\ProgramData\OpenAI\Codex
  • C:\Users\Jupiter\.codex\requirements.toml
  • C:\Users\Jupiter\.codex\managed_config.toml

Steps to reproduce

  1. Configure Browser allowlist with http://localhost:5173 and http://127.0.0.1:5173.
  2. Start a local frontend dev server on port 5173.
  3. Ask Codex desktop Browser to open http://localhost:5173/.
  4. Observe that the in-app Browser rejects the navigation before the page can load.

Actual result

Codex Browser returns:

Browser Use rejected this action due to browser security policy. Reason: Browser use cannot access http://localhost:5173 because enterprise network policy blocks it. The agent must not attempt to achieve the same outcome via workaround, indirect execution, raw CDP or browser commands, alternate browser surfaces, or policy circumvention. Proceed only with a materially safer alternative that does not require this blocked browser action; if none exists, stop and request user input.

Expected result

A localhost origin explicitly present in the Browser allowlist should be accessible for local app testing, unless there is an actual higher-precedence managed policy. If a cloud-managed policy is responsible, the UI/error should identify that policy source or surface where it can be changed. If no managed policy applies, the local Browser allowlist should take effect.

Notes

This appears to be either:

  • a precedence/caching bug where the Browser runtime ignores the local allowlist or active session allowlist,
  • a stale cloud-managed policy cache that still applies even when no local managed policy file exists,
  • or an unclear/incorrect error classification where a local Browser permission denial is reported as enterprise network policy.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    windows-osIssues related to Codex on Windows systems
    on Jul 16, 2026
  2. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. annennavip-design commented on Sep 24, 2026

    @annennavip-design

    I am experiencing what appears to be the same issue on the current Windows version.

    Environment

    • OS: Windows
    • ChatGPT/Codex Desktop: 26.917.71314
    • Release date: 2026/09/24
    • Subscription: ChatGPT Plus
    • Local development server: Vite 6.4.3
    • URL: http://localhost:5173/

    Issue

    The Vite development server starts successfully.

    When I manually open:

    http://localhost:5173/

    in the Codex in-app browser, the web application loads and works normally.

    However, when I ask the Codex agent to inspect or interact with the same page, Browser Use is rejected due to a management policy (enterprise network policy / browser security policy).

    The Codex agent is able to detect that the localhost tab is already open, but when it attempts to interact with the page, the action is rejected by the policy.

    Verified

    • Vite starts successfully.
    • localhost:5173 is reachable manually.
    • The application displays normally in the Codex in-app browser.
    • Browser functionality is enabled.
    • Web browsing permission is set to "Always Allow".
    • Network access is enabled.
    • Codex diagnostics reports that the Codex dependencies are healthy.
    • The issue occurs only when the Codex agent attempts to use Browser Use on the localhost page.

    In other words, the localhost connection itself works, and the user can manually access the page in the in-app browser, but agent-driven interaction with the same page is blocked.

    I am reporting this as additional information because the same issue appears to still be reproducible in the current version (26.917.71314).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbrowserbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions