Why can't Codex open a local HTML file?
Public Codex Desktop reports from September 2026 say Browser Use rejects a file:// URL for a local HTML prototype, report, or dashboard, even when the same file opens by hand. The reported error is a browser URL policy block. Those reports cover Windows, macOS, and Linux desktop sessions. They do not prove that every Codex version or surface behaves this way.
Does Codex Browser Use support file:// URLs?
The cited GitHub issues were still open on September 30, 2026. Comments on those issues describe a shipped check that accepts http, https, and exactly about:blank, then rejects file before navigation. That is reporter evidence about specific desktop builds, not an OpenAI statement that every install blocks file:// forever. Codex CLI and the Codex IDE extension are documented as not including this browser at all.
Why does Codex say Browser Use rejected this action?
That sentence is the error text in the local-preview reports: “Browser Use rejected this action due to browser security policy. Reason: The browser URL policy blocks this action.” For these HTML cases, the refusal is tied to the file:// URL, not to a missing index.html.
How do I preview HTML generated by Codex?
Use a URL whose scheme the browser policy accepts. For work on the same machine, start a local development server and open the http://localhost or http://127.0.0.1 address. When you need a link without that server, publish the static HTML or ZIP and open the HTTPS preview URL. You can also open a file-backed page yourself in the desktop browser; that manual view is separate from an agent Browser Use action.
Can I preview Codex HTML without localhost?
Yes, when the output is static HTML, CSS, and JavaScript. Publish the file or the static folder, then open the HTTPS preview. That path does not start a dev server, and it does not change Codex. If the page needs a running app server, API, or build step, localhost is still the local debugging path.
How do I turn a local HTML file into an HTTPS URL?
Upload the HTML file, or zip index.html with its relative CSS, JavaScript, images, and fonts, then publish it on HTMLShare. The result is a browser URL. Guest uploads are 1 MB HTML and 3 MB ZIP. Signed-in projects accept one HTML file up to 5 MB and a project up to 20 MB.
Can Codex Browser Use open an HTMLShare link?
The local-file reports describe a scheme check, not a block on every website. http and https are the schemes those comments say are accepted, and an HTMLShare preview is an HTTPS URL. Codex can still ask before it uses a new site. HTMLShare does not override Codex policy and cannot promise that a given desktop build will open the link.
Why can I open the file manually but Codex cannot?
Opening a tab yourself and letting Browser Use navigate are different actions. Issue reports say the in-app browser can show the file after a manual open, while the agent action is rejected. “Always allow” in Settings > Browser is a website permission. Comments on the macOS, Windows, and Linux reports say the protocol check runs before saved site consent, so that setting does not approve file://.
Should I use localhost or a hosted preview?
Use localhost when you are actively developing on that computer and the loopback URL already loads. Use an HTTPS preview when you do not want to run a server, or when a phone, teammate, client, or remote agent needs a stable link. A working localhost session is not a reason to publish.
Can I share the Codex preview with someone else?
A file:// path and a localhost URL stay on your machine. An HTTPS preview can be opened in a normal browser by someone who does not have Codex, your repo, or your dev server. Send that link for review. Keep production hosting for the version you intend to operate long term.