codex - 💡(How to fix) Fix codex:// protocol handler fails on Windows - # fragment treated as file path

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…

Error Message

Windows shows error: Result: Error dialog appears:

RAW_BUFFERClick to expand / collapse

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.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix codex:// protocol handler fails on Windows - # fragment treated as file path