codex:// protocol handler fails on Windows - # fragment treated as file path

Resolved 💬 2 comments Opened May 31, 2026 by EUM27 Closed May 31, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

26.527.3686.0

What subscription do you have?

ChatGPT Pro

What platform is your computer?

"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"

What issue are you seeing?

OS: Windows 11
App version: 26.527.3686.0 (Microsoft Store)

When returning from Gmail OAuth in browser, the callback URL contains a # fragment:
codex://...#type=click&tag=13394687635910341552

Windows shows error:
"Unable to find Electron app at C:\Program Files\WindowsApps\OpenAI.Codex_...\app\co...#type=click&tag=..."
"Cannot find module '...#type=click&tag=...'"

The # and everything after it is being interpreted as a file path instead of a URL fragment.
Reinstalling, resetting, and re-registering the protocol handler did not fix this.

<img width="1920" height="1019" alt="Image" src="https://github.com/user-attachments/assets/bdda9110-87bd-4bc4-99af-581fbd1a60ba" />

What steps can reproduce the bug?

  1. Open Codex app
  2. Go to Settings and connect Gmail account
  3. Browser opens for OAuth authentication
  4. Complete authentication in browser
  5. Browser redirects back to Codex via codex:// protocol URL containing # fragment

(e.g. codex://...#type=click&tag=13394687635910341552)

Result: Error dialog appears:
"Unable to find Electron app at C:\Program Files\WindowsApps\OpenAI.Codex_...\app\co...#type=click&tag=..."
"Cannot find module '...#type=click&tag=...'"

The # fragment in the callback URL is being treated as a file path, causing the app to fail.
Gmail connection does not complete.

What is the expected behavior?

After completing Gmail OAuth in the browser, the app should
handle the codex:// callback URL correctly, parse the # fragment
as a URL fragment (not a file path), and successfully complete
the Gmail connection.

Additional information

Tried the following without success:

  • Reinstalling the app from Microsoft Store
  • Re-registering the protocol handler via PowerShell
  • Resetting the app package
  • Manually setting registry keys for codex:// protocol handler
  • Rebooting and re-registering AppxManifest.xml before launching the app

The app itself launches fine. The issue only occurs when returning
from OAuth flow in the browser.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

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

  • #25368
  • #25157
  • #25203
  • #25188
  • #25257

Powered by Codex Action

smilingz1203 · 2 months ago

I can confirm this issue. Same error on Windows 11 with Codex v26.527.3686.0 (Microsoft Store).
Spent an entire day troubleshooting. The codex_scheme:// protocol is not being handled correctly
and the # fragment is treated as a file path. Please prioritize this fix.