local HTML Browser Open button does nothing and local screenshot previews always stay stale on Windows
What version of the Codex App are you using (From “About Codex” dialog)?
26.429.61741
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
Environment:
- Codex Desktop on Windows
- Local workspace on a secondary drive
- Local HTML and PNG files opened from disk
Issue 1: When Codex renders a local HTML file as a preview card in chat, the card includes an Open button. Clicking the Open button does not do anything. The in-app browser does not open or navigate to the local file, and no visible error is shown.
Issue 2: Local screenshot previews in chat can stay stale after the underlying file is overwritten.
What steps can reproduce the bug?
Issue 1:
- In a Windows Codex Desktop workspace, create a simple local HTML file, for example: C:\Projects\example-site\preview.html
- Link it in a Codex response using a local file markdown link: preview.html
- A preview card appears in chat with an Open button.
- Click Open.
Issue 2:
- Generate or save a screenshot, for example: C:\Projects\example-site\preview.png
- Link or display it in Codex chat.
- Overwrite
preview.pngwith a new screenshot. - Link or display the same path again.
What is the expected behavior?
The chat image preview should show the updated screenshot.
This makes local frontend/design review confusing because users cannot reliably open generated HTML previews or trust that screenshot previews are showing the latest file contents.
Additional information
What actually happens instead is the chat preview will continue showing the older image.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #21016
Powered by Codex Action
I can reproduce the stale local image preview behavior on macOS as well, so this does not appear to be Windows-only.
Environment:
- Codex App: 26.519.81530
- Bundle version: 3178
- Bundle identifier: com.openai.codex
- Platform: macOS 26.5, build 25F71
- Architecture: arm64
- App path: /Applications/Codex.app
Reproduction:
- In a local Codex workspace, generate or overwrite a PNG screenshot.
- Have Codex show it in chat using Markdown with an absolute local path, for example:
 - Overwrite the same PNG path with a new screenshot.
- Ask Codex to show the same Markdown image path again.
Expected: The chat image preview should show the updated image contents.
Actual: The chat continues to show the older image, apparently cached by local file path. Saving the same image under a new filename, for example with a timestamp suffix, makes the updated image appear immediately.
Impact:
This is confusing during iterative visual QA because stable filenames such as latest.png are natural for generated previews, but the chat preview can show stale content.
Workaround: Use a unique filename for every screenshot shown in chat, while keeping stable filenames only for automation or repository output.
Confirming the local HTML card Open button issue on Codex Desktop 26.1117.3838.0 (installed package version), Windows 11 25H2 x64 (build 26200.9974).
- Generate a self-contained HTML file in a local Windows workspace on a drive such as
E:and link it in the Codex response using its absolute path. - Click Open on the resulting Website card. The card shows the HTML title, but no browser tab opens and there is no visible error. The same file renders when opened directly in Edge.
The desktop log records this warning on repeated clicks (path anonymized):
warning [link-opening] Invalid link URL initiator=mcp_app_resource url=E:/workspace/预览.html
The warning shows that the click reaches the link handler with a raw Windows path. The URL parser reads E:/… as the e: scheme, so the browser handoff is rejected before the page can load. Please route Windows absolute paths from these cards through the local-file opener or convert them to a standard file: URL before URL validation. If opening fails, a visible error would also help.
Still reproducible on Codex Desktop for Windows 26.1120.6357.0 (app version 26.1120.50957, Windows 11 x64). Also related to #32078.
Symptoms
For a generated local HTML file shown as a Website end-resource card:
- Clicking Open does nothing (no error toast/dialog).
- Opening the
Open ⌄dropdown only shows ChatGPT and Copy link (no Chrome/Edge, even though Windows default associations forhttp/https/.htmlare set to Chrome). - Clicking ChatGPT in the dropdown also does nothing.
- Clicking Copy link works (and pasting the copied path into Chrome opens the file).
- Clicking the inline file link in the assistant message text does work and renders
file:///C:/...in the right-panel browser sidebar.
Desktop log on every Open / ChatGPT click:
warning [link-opening] Invalid link URL initiator=mcp_app_resource url=C:/Users/<user>/.../example.html
Root Cause (from inspecting app.asar)
1. Renderer (Chromium GURL) vs. Main Process (Node.js URL) mismatch on Windows drive paths
The Website card receives a raw Windows absolute path (C:/Users/<user>/.../example.html) from editedFilePaths, without a file:/// scheme:
- In the Electron renderer (Chromium on Windows):
new URL("C:/Users/<user>/.../example.html")automatically coerces a Windows drive path intoprotocol: "file:"(href: "file:///C:/..."). - Because the local-URL check uses
new URL(target)and testsprotocol === "file:", the renderer mistakenly classifies the raw Windows path as an already-validfile:URL (on macOS/Linux,new URL("/Users/...")throws, so it correctly falls into the local-file branch). - As a result:
- Both Open and dropdown ChatGPT bypass
openWorkspaceFile(which usespathToFileURL()and works) and instead dispatchopen-in-browserwith the original unconverted stringC:/Users/...(which also slips past the renderer's URI scheme regex/^(?:[a-z][a-z0-9+.-]*:|www\.|\/\/)/ibecauseC:matches a scheme). - Copy link is enabled for the raw string and works because it writes straight to the clipboard without main-process URL validation.
- Both Open and dropdown ChatGPT bypass
- In the Electron main process (Node.js WHATWG
URL):new URL("C:/Users/<user>/.../example.html")parsesC:asprotocol: "c:", not"file:".- Even when clicking ChatGPT (
openTarget: "in-app-browser"), the target resolver rejects"in-app-browser"becauseprotocolis"c:", falls through to the protocol allowlist, fails validation, logsInvalid link URL, and silently returnsfalse.
- Even when clicking ChatGPT (
2. Missing external browsers in the Open ⌄ dropdown on Windows
In the main-process browser target discovery (getTargets), both the native URL-handler helper (launch-services-helper) and its fallback immediately return null / [] when process.platform !== "darwin", leaving Windows with no external browser entries in the dropdown.
Suggested Fix
- Reject raw Windows drive paths (
^[A-Za-z]:[\\/]) in the renderer's local-URL helper before callingnew URL(...)(similar to how the Website card's own HTML<title>loader already checks for Windows drive paths), so local Windows HTML files route throughopenWorkspaceFile→pathToFileURL()— and/or normalize tofile:///before sendingopen-in-browser. - Add Windows browser discovery (or at least a "Default browser" option) to
getTargetsso external browsers appear in theOpen ⌄dropdown on Windows.