Skip to content

Codex Desktop Windows: connector OAuth "Open in Codex" opens Electron error instead of completing callback #25157

Open

Description

@kerimala

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

OpenAI.Codex_26.527.3378.0_x64__2p2nqsd0c76g0

What subscription do you have?

ChatGPT Pro ($200/month)

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64 (Windows 11 Pro)

What issue are you seeing?

Codex Desktop on Windows fails to complete connector OAuth after browser login. When authenticating Codex connectors and clicking "Open in Codex" in the browser, Windows opens an Electron error dialog instead of returning the OAuth callback to the running Codex app.

This is a Codex Desktop/App protocol callback issue, not a Codex CLI issue.

Observed with:

  • OpenAI Developer plugin connection
  • Supabase connector connection
  • Browser used for the login flow: Brave

Actual error dialog:

Error launching app

Unable to find Electron app at C:\Program
...\oauth_callback?code=[REDACTED]

Cannot find module 'C:\Program
...\oauth_callback?code=[REDACTED]'

Local investigation:

  • The installed MSIX package is OpenAI.Codex_26.527.3378.0_x64__2p2nqsd0c76g0.
  • AppxManifest.xml registers the codex protocol with executable app/Codex.exe.
  • The Electron error text matches Electron's default app loader path for "Unable to find Electron app", suggesting the codex://...oauth_callback?... activation URL is being interpreted as an Electron app path / first positional argument before the packaged Codex app handles it.

What steps can reproduce the bug?

  1. Open Codex Desktop on Windows.
  2. Start connecting a connector or plugin that uses browser OAuth, such as the OpenAI Developer plugin or Supabase connector.
  3. Complete the browser login flow.
  4. Click "Open in Codex" in the browser.
  5. Observe that an Electron "Error launching app" dialog opens instead of Codex completing the connector authentication.

What is the expected behavior?

Codex Desktop should receive the codex://...oauth_callback... protocol activation URL, route it to the running app, and complete connector authentication.

The OAuth callback URL should not be interpreted as an Electron application path.

Additional information

A redacted screenshot is attached showing the Electron dialog. The OAuth code= value has been fully redacted before sharing.

I searched existing openai/codex issues for the exact error text and related terms, including:

  • Unable to find Electron app
  • Error launching app
  • oauth_callback
  • Open in Codex
Image
  • codex://
  • protocol handler
  • Supabase connector OAuth
  • OpenAI Developer connector OAuth

I found related Codex Desktop OAuth reports, but not this specific Windows protocol callback failure where the OAuth callback is treated as an Electron app path.

Activity

  1. added
    app
    on May 29, 2026
  2. added
    bug
    windows-os
    auth
    on May 29, 2026
  3. GMarangoci commented on May 29, 2026

    @GMarangoci

    I’m seeing the same issue.

    Codex App version: 26.527.3686.0
    Codex CLI version: 0.98.0
    Subscription: ChatGPT Pro
    Platform: Windows

    Affected OAuth flows:

    • Supabase MCP OAuth
    • Google Drive OAuth
    • GitHub OAuth, likely same error
    • Possibly every plugin/connector that uses the Codex browser OAuth callback

    Error after browser authorization:

    Error launching app

    Unable to find Electron app at C:\Program
    ...\oauth_callback?state=codex_scheme_oauth_s_...

    Cannot find module 'C:\Program
    ...\oauth_callback?state=codex_scheme_oauth_s_...'

    Troubleshooting tried:

    • Repair Codex app
    • Reset Codex app
    • Uninstall/reinstall Codex
    • Reboot Windows
    • Attempted Appx re-registration
    • Verified codex protocol registration exists for OpenAI.Codex MSIX package

    Supabase workaround:
    Supabase MCP works only when bypassing OAuth with a bearer token via SUPABASE_ACCESS_TOKEN. Google Drive still fails because OAuth is required.

    This took substantial troubleshooting to isolate, and it blocks connecting any OAuth-based plugin/connector on Windows.

  4. Innerpeace1990 commented on May 30, 2026

    @Innerpeace1990

    I’m seeing the same connector OAuth callback failure on Windows, with OpenAI Developers / OpenAI Platform.

    Environment:

    • Codex App: OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    • Windows: Windows 10 Pro for Workstations, version 25H2, build 26200, 64-bit
    • Default browser: Chrome (ChromeHTML)
    • Plugin: openai-developers version 1.1.0
    • Connector/app: OpenAI Platform (openai-platform)

    What works:

    • The OpenAI Developers plugin itself installs and is enabled.
    • Its chat skills are visible/usable. For example, trying “Create an OpenAI API key to use in this project” starts the skill flow in chat.
    • Google Drive connection works after reinstalling that plugin.

    What fails:

    • In the OpenAI Developers plugin page, clicking “Continue connecting app” for OpenAI Platform opens the browser authorization flow.
    • After authorization, the callback fails with the Windows Electron dialog instead of returning to Codex.

    Error dialog, with OAuth code redacted:

    Error launching app
    
    Unable to find Electron app at C:\Program
    ...\oauth_callback?code=[REDACTED]
    
    Cannot find module 'C:\Program
    ...\oauth_callback?code=[REDACTED]'
    

    Additional local check:

    • The codex: protocol registration exists and points to the Codex MSIX AppX protocol handler (OpenAI.Codex_2p2nqsd0c76g0!App, ContractId=Windows.Protocol).
    • Even after restarting Codex and retrying the OpenAI Platform connection, the same Electron callback error appears.

    This looks like the plugin is installed correctly, but the OpenAI Platform connector OAuth callback is not being delivered back to the Codex Windows desktop app correctly.

  5. Innerpeace1990 commented on May 30, 2026

    @Innerpeace1990

    Correction to my previous environment details: I initially reported the Windows/AppX package versions from PowerShell, but the user-visible versions are different.

    Correct user-visible versions:

    • Codex About dialog: 26.527.31326
    • Windows Settings page: Windows 11 Pro for Workstations, version 25H2, OS build 26200.8457

    Additional note:

    • PowerShell reports the installed AppX package as OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0, which is why my earlier comment included 26.527.3686.0.
    • PowerShell also reports WindowsProductName as “Windows 10 Pro for Workstations” while OsName reports “Microsoft Windows 11 专业工作站版”. The user-visible Windows Settings value is Windows 11 Pro for Workstations, so that should be treated as the correct environment label.
  6. dclamage commented on May 30, 2026

    @dclamage

    I have the exact same issue with Codex about dialog 26.527.31326

    Windows 11 Pro 25H2 26200.8457

  7. saroo98 commented on May 30, 2026

    @saroo98

    Same root cause here with the Figma connector / "Figma MCP in ChatGPT" OAuth flow on Windows, so this is not limited to GitHub/Supabase/OpenAI Platform.

    Environment:

    • Codex package: OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    • Windows x64, build 26200.8524

    Repro:

    1. Open Codex desktop app.
    2. Start the Figma connection flow.
    3. Browser opens the Figma consent page for "Figma MCP in ChatGPT".
    4. Approve the authorization.
    5. Browser shows that authorization is finishing and redirects to codex://oauth_callback?....
    6. Codex shows the Electron error dialog instead of completing the connection.

    Observed error:

    Error launching app
    
    Unable to find Electron app at C:\Program
    ...\oauth_callback?code=...&state=codex_scheme_oauth_...
    
    Cannot find module 'C:\Program
    ...\oauth_callback?code=...&state=codex_scheme_oauth_...'
    

    Additional note:

    • Reset-AppxPackage did not resolve it.

    This looks like the same Windows protocol/deep-link handling bug affecting another OAuth-based connector.

  8. ASMN-96 commented on May 31, 2026

    @ASMN-96

    Additional Windows/Supabase repro from another Codex Desktop install.

    Environment:

    • Windows 11
    • Codex Desktop package: OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    • Codex CLI path/version: AppData Codex CLI works, codex-cli 0.135.0-alpha.1
    • Browser used for OAuth: Microsoft Edge
    • Affected connector: Supabase app connector

    Observed behavior:

    • Supabase authorization page shows the request as approved for ChatGPT.
    • The OAuth/deep-link callback still fails in Codex Desktop with the Electron dialog shaped like:
      • Error launching app
      • Unable to find Electron app at C:\Program Files\WindowsApps\OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0\app\...?...state=codex_scheme...
      • Cannot find module ...
    • After approval, the Codex app connector still returns: 400: Server returned 400: "We couldn't connect your account. Please try again."

    Local diagnostics:

    • Manual Supabase MCP configured via the AppData Codex CLI works and can list project Edge Functions, so Supabase OAuth/MCP access itself is not the blocker.
    • The failure is isolated to the Codex Desktop/app connector callback path.
    • AppxManifest.xml registers <uap:Protocol Name="codex" /> with Executable="app/Codex.exe".
    • AppX URL association points codex to AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401 with ContractId=Windows.Protocol and PackageRelativeExecutable=app\Codex.exe.
    • HKCU\Software\Classes\codex exists with URL Protocol, but no Shell\open\command child key.
    • Codex Desktop logs do not show receiving the Supabase callback, which suggests the callback is failing before the running app receives it.

    Workaround:

    • Manual Supabase MCP remains usable through the AppData Codex CLI.
    • The Supabase app connector remains unusable until the Windows codex:// protocol/OAuth callback handling is fixed.

    No OAuth codes, auth IDs, project refs, tokens, or org names included here.

  9. 9thLevelSoftware commented on May 31, 2026

    @9thLevelSoftware

    Additional repro from another Windows desktop install. This is still failing for plugin/connector authorization.

    Environment:

    • Codex Desktop MSIX: OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    • Codex CLI/app-server: 0.135.0
    • Windows: Windows 10 Pro, DisplayVersion 25H2, build 26200.8457, 64-bit
    • Observed while trying to authorize a Codex app/plugin connector from the desktop app

    Observed behavior:

    1. Start connector/plugin authorization from Codex Desktop.
    2. Browser returns to a codex://connector/oauth_callback?... URL.
    3. Windows launches a new Codex process, but Electron displays:
      • Error launching app
      • Unable to find Electron app at C:\Program ...\oauth_callback?code=...
      • Cannot find module 'C:\Program ...\oauth_callback?code=...'
    4. Authorization does not complete.

    Process evidence, with OAuth values redacted:

    "C:\Program Files\WindowsApps\OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0\app\Codex.exe" codex://connector/oauth_callback?code=<redacted>&state=<redacted>
    

    This looks like AppX protocol activation is passing the URL as a positional argument to Electron, and Electron then treats it as the app path/module instead of forwarding it to the running Codex app as a protocol callback.

    Registry/AppX observations:

    HKCU\Software\Classes\codex
      (default) = URL:codex
      URL Protocol = ""
    
    AppX protocol association:
      AppUserModelID = OpenAI.Codex_2p2nqsd0c76g0!App
      PackageRelativeExecutable = app\Codex.exe
      ContractId = Windows.Protocol
      PackageId = OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    

    I also tested a local workaround by adding a per-user shell\open\command value like:

    "C:\Program Files\WindowsApps\OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0\app\Codex.exe" -- "%1"
    

    Windows still launched the AppX protocol handler as Codex.exe codex://connector/oauth_callback?... without the -- separator, so that registry override does not appear to be sufficient for this MSIX/AppX install path. I reverted that local registry change afterward.

    Expected behavior:

    • Codex Desktop should consume the codex://connector/oauth_callback?... activation and complete connector authorization.
    • Electron should not interpret the callback URL as an app path/module.
  10. wsldl123292 commented on Jun 1, 2026

    @wsldl123292

    +1

  11. Keiran-James commented on Jun 1, 2026

    @Keiran-James

    +1

  12. michnamateusz commented on Jun 1, 2026

    @michnamateusz

    I approached this today. This plus info that my session was expired.

    I logged into codex with new session and then I encountered that bug with Electron.

    I wanted to check if chatgpt.com in the browser also makes problems - went there and had another info about expired session.
    So I relogged in chatgpt.com account.

    When I went back to codex app it was fine.

    Summary: Guys, please logout and login in both places: online website and codex login flow.

  13. egorix commented on Jun 1, 2026

    @egorix

    Same here!
    Windows 11, WSL environment configured.
    Using supabase plugin.

  14. 8 remaining items

  15. michnamateusz commented on Jun 2, 2026

    @michnamateusz

    Did you gry also refreshing the session going on web to chatgpt.com like I said?

  16. agdula commented on Jun 2, 2026

    @agdula

    I can reproduce what appears to be the same Windows Codex Desktop OAuth/deep-link callback failure.

    Scenario

    • Codex Desktop on Windows
    • Tried to use Gmail connector / OAuth flow from ChatGPT/Codex integration
    • After the browser/action says to open in Codex, Windows shows an Electron error dialog instead of completing the OAuth callback.

    Error shown

    Error launching app
    
    Unable to find Electron app at
    C:\Program ...\oauth_callback?state=codex_scheme_oauth_...&...
    
    Cannot find module 'C:\Program ...\oauth_callback?state=codex_scheme_oauth_...&...'
    

    Expected behavior

    Codex should receive the codex://oauth_callback?... deep link and complete the connector authorization.

    Actual behavior

    The callback/deep link appears to be interpreted as an Electron app/module path, causing Electron to try to load a non-existent path under C:\Program ... and fail.

    I’m not attaching the screenshot because the OAuth callback URL contains sensitive state/callback parameters, but the dialog matches the error described in this issue.

  17. chingkingm commented on Jun 2, 2026

    @chingkingm

    I’m seeing the same issue on Windows. The OAuth callback opens an Electron error dialog saying it is unable to find the Electron app at the oauth_callback URL.

  18. tosky1125 commented on Jun 2, 2026

    @tosky1125

    Same issue on OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0
    Windows 11 Pro 10.0.26200

    Reproduces with the Notion connector / Notion MCP OAuth flow.
    After completing browser auth, Codex launches with a codex://connector/oauth_callback/... URL, but Electron shows:

    Error launching app
    Unable to find Electron app at C:\Program ... oauth_callback?code=[REDACTED]
    Cannot find module 'C:\Program ... oauth_callback?code=[REDACTED]'

    I confirmed via Win32_Process that Codex.exe receives the codex://connector/oauth_callback/... argument, so Windows protocol dispatch appears to reach Codex, but the app treats the callback URL as an Electron app path.

  19. tugkan98 commented on Jun 2, 2026

    @tugkan98

    I reproduced this on Windows with Codex App 26.527.7698.0.

    Error:
    Unable to find Electron app at:
    C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\codex:

    Context:

    • Plugin/connector OAuth callback failed when browser opened codex://...
    • Re-registering AppX package did not fix it.

    Workaround that fixed it:
    Set both protocol handlers to launch Electron with app.asar first:

    HKCU\Software\Classes\codex\shell\open\command
    HKCU\Software\Classes\AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401\Shell\open\command

    Value:
    "C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\Codex.exe" "C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\resources\app.asar" "%1"

  20. chisfee-cyber commented on Jun 2, 2026

    @chisfee-cyber

    +1. pls fix as soon as possible

  21. abselon commented on Jun 2, 2026

    @abselon

    Facing similar issues, please fix soon +2

  22. legomina commented on Jun 2, 2026

    @legomina

    Cant connect Google Drive, same Error

    Codex Windows app version: 26.527.7698.0
    Windows: Windows 11
    Repro:

    1. Open PowerShell
    2. Run: Start-Process "codex://new"
    3. Error appears:
      Unable to find Electron app at C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\app\codex:\new
      Cannot find module ...
  23. Abdelouahedb commented on Jun 2, 2026

    @Abdelouahedb

    same problem

  24. emorillo2 commented on Jun 2, 2026

    @emorillo2
    ## Workaround: Windows Codex connector OAuth callback opens Electron error
    
    I was hitting the Windows Codex Desktop OAuth/deep-link bug where connector login fails after browser authorization.
    
    Error looked like:
    
    Error launching app
    
    Unable to find Electron app at:
    C:\Program Files\WindowsApps\OpenAI.Codex_...\oauth_callback?code=...
    
    Cannot find module:
    C:\Program Files\WindowsApps\OpenAI.Codex_...\oauth_callback?code=...

    I also saw a related notification/action callback variant:

    Unable to find Electron app at:
    C:\Program Files\WindowsApps\OpenAI.Codex_...\type=action&action=0&tag=...
    

    Root cause observed locally

    The codex:// protocol and Codex AppX launcher classes existed, but Windows was launching Codex.exe in a way that made Electron treat the callback URL/action argument as the app/module path.

    The workaround that fixed it was to launch Codex with app.asar first, then pass the callback URL as %1:

    "C:\Program Files\WindowsApps\OpenAI.Codex_<VERSION>_x64__2p2nqsd0c76g0\app\Codex.exe" "C:\Program Files\WindowsApps\OpenAI.Codex_<VERSION>_x64__2p2nqsd0c76g0\app\resources\app.asar" "%1"
    

    For my install, I had to patch all three HKCU handlers:

    HKCU\Software\Classes\codex\shell\open\command
    HKCU\Software\Classes\AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401\Shell\open\command
    HKCU\Software\Classes\AppXet2dbz92z96mkb6bdgsgpvhafzts64eb\Shell\open\command
    

    I also had to remove the AppX activation metadata from the two AppX... classes, especially DelegateExecute, otherwise Windows kept using the packaged/broken activation path.

    PowerShell workaround

    Run this as the affected Windows user. Admin is usually not required for HKCU, but may be needed if Windows denies a protected package key.

    $ErrorActionPreference = "Stop"
    
    $packageKeysRoot = "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages"
    $packageKey = (reg query $packageKeysRoot /f "OpenAI.Codex_" /k |
        Where-Object { $_ -match "\\OpenAI\.Codex_\d" } |
        Sort-Object |
        Select-Object -Last 1).Trim()
    
    if (-not $packageKey) {
        throw "Could not find installed OpenAI.Codex AppX package."
    }
    
    $packageName = Split-Path -Path $packageKey -Leaf
    $packageRoot = Join-Path "C:\Program Files\WindowsApps" $packageName
    $codexExe = Join-Path $packageRoot "app\Codex.exe"
    $appAsar = Join-Path $packageRoot "app\resources\app.asar"
    
    if (-not (Test-Path $codexExe)) { throw "Missing Codex.exe: $codexExe" }
    if (-not (Test-Path $appAsar)) { throw "Missing app.asar: $appAsar" }
    
    $fixedCommand = '"' + $codexExe + '" "' + $appAsar + '" "%1"'
    
    $backup = Join-Path $PWD "Codex-Protocol-Registry-Backup-$(Get-Date -Format 'yyyyMMdd-HHmmss').txt"
    "Codex registry workaround backup $(Get-Date -Format o)" | Set-Content $backup
    "Package: $packageName" | Add-Content $backup
    "Command: $fixedCommand" | Add-Content $backup
    
    $keysToBackup = @(
        "HKCU\Software\Classes\codex",
        "HKCU\Software\Classes\AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401",
        "HKCU\Software\Classes\AppXet2dbz92z96mkb6bdgsgpvhafzts64eb"
    )
    
    foreach ($key in $keysToBackup) {
        "`n==== Before: $key ====" | Add-Content $backup
        reg query $key /s 2>&1 | Add-Content $backup
    }
    
    reg add "HKCU\Software\Classes\codex" /ve /d "URL:codex" /f
    reg add "HKCU\Software\Classes\codex" /v "URL Protocol" /t REG_SZ /d "" /f
    reg add "HKCU\Software\Classes\codex\shell\open\command" /ve /d $fixedCommand /f
    
    $appxClasses = @(
        "HKCU\Software\Classes\AppXybfp6cjpb1wf0pftw0fd4bz59gzn1401",
        "HKCU\Software\Classes\AppXet2dbz92z96mkb6bdgsgpvhafzts64eb"
    )
    
    foreach ($classKey in $appxClasses) {
        $openKey = "$classKey\Shell\open"
        $commandKey = "$openKey\command"
    
        reg add $commandKey /ve /d $fixedCommand /f
    
        reg delete $commandKey /v DelegateExecute /f 2>$null
    
        foreach ($name in @(
            "AppUserModelID",
            "PackageRelativeExecutable",
            "DesktopAppXActivateOptions",
            "ContractId",
            "DesiredInitialViewState",
            "PackageId"
        )) {
            reg delete $openKey /v $name /f 2>$null
        }
    }
    
    foreach ($key in $keysToBackup) {
        "`n==== After: $key ====" | Add-Content $backup
        reg query $key /s 2>&1 | Add-Content $backup
    }
    
    Write-Host "Applied Codex Windows protocol/OAuth workaround."
    Write-Host "Command: $fixedCommand"
    Write-Host "Backup: $backup"
    Write-Host "Fully quit Codex from the tray/taskbar, reopen it, then retry connector OAuth."
    
    
    After running this and fully restarting Codex, my connector OAuth flow started working.
  25. Camenwolf commented on Jun 3, 2026

    @Camenwolf

    GUYS!!! OPENAI!!! I'm paying $100 bucks a month for this f***ing thing and I haven't been able to connect to GitHub yet. How about an update? How about pausing our subscription charge until you get the thing working that many of us are paying $100 - $200 a month for, and communicating with us as to when you think you might have this fixed? WTF is wrong with corporations these days.

  26. tosky1125 commented on Jun 3, 2026

    @tosky1125

    GUYS!!! OPENAI!!! I'm paying $100 bucks a month for this f***ing thing and I haven't been able to connect to GitHub yet. How about an update? How about pausing our subscription charge until you get the thing working that many of us are paying $100 - $200 a month for, and communicating with us as to when you think you might have this fixed? WTF is wrong with corporations these days.

    you can do it in web browser based ChatGPT as workaround :(

  27. Camenwolf commented on Jun 3, 2026

    @Camenwolf

    GUYS!!! OPENAI!!! I'm paying $100 bucks a month for this f***ing thing and I haven't been able to connect to GitHub yet. How about an update? How about pausing our subscription charge until you get the thing working that many of us are paying $100 - $200 a month for, and communicating with us as to when you think you might have this fixed? WTF is wrong with corporations these days.

    you can do it in web browser based ChatGPT as workaround :(

    HEY! That seemed to work!!! I got GitHub, Gmail, and Google Drive all connected. THANK YOU!!!! I gotta admit I'm still kinda pissed at OpenAI for their stony silence on what seems like a very critical issue, but at least I can move forward with my project now! Wish I could buy you a beer!

  28. irvineai commented on Jun 3, 2026

    @irvineai

    Same here, when can it be fixed in windows system?

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

    appauthbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions