Skip to content

OpenAI Developers installation fails: “OAuth state not found” #54924

Open

Description

@Jory5932

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

Version 26.1013.40934

What subscription do you have?

Chatgpt Plus

What platform is your computer?

Windows

What issue are you seeing?

Installing OpenAI Developers fails with “OAuth state not found”, even though I’m successfully signed in. Restarting and signing in again haven’t helped.

What steps can reproduce the bug?

Feedback ID: no-active-thread-01a14b6f-a3a1-7ec0-985d-f878f9124876

What is the expected behavior?

  1. Open the ChatGPT desktop app.
    1. Sign in.
    1. Open Plugins → OpenAI Developers.
    1. Click Install plugin.
    1. “OAuth state not found” appears.

Additional information

No response

Activity

  1. added
    app
    on Oct 17, 2026
  2. added
    bug
    windows-os
    auth
    skills
    on Oct 17, 2026
  3. github-actions commented on Oct 17, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. Jory5932 commented on Oct 17, 2026

    @Jory5932
    Author

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

    Powered by Codex Action

    Separate issue entirely.

  5. AlexWFreitas commented on Oct 17, 2026

    @AlexWFreitas

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

    Powered by Codex Action

    Separate issue entirely.

    Agreed, a similar problem is listed on the other issue, but the other issue should have been split into two issues because there are two problems mentioned there. It's nice that this one has been created.

    Just to add onto this one, this error also happens when you add a Custom MCP Server that uses OAuth.
    If you do it through Codex App, the OAuth state not found error happens.
    If you do through ChatGPT Web, it seems to work correctly..

  6. sumnervan commented on Oct 19, 2026

    @sumnervan

    Additional reproduction on Windows on October 19, 2026: a custom remote MCP connects through ChatGPT web, but the Codex desktop plugin OAuth callback fails with OAuth state not found. A newly created connector registration reproduces the failure, so rebuilding the connection did not resolve it.

    The affected integration is Propensity Forge (Staging). The installed Windows package path identifies OpenAI.Codex_26.1013.4894.0_x64; the About-dialog version was not separately collected.

    Observed reproduction

    1. Start connecting the custom OAuth MCP from Codex desktop's Plugins screen.
    2. Complete the browser authorization and return to Codex.
    3. Codex recognizes the callback, but POST /aip/connectors/links/oauth/callback returns HTTP 404 with {"detail":"OAuth state not found"}.
    4. Repeat with a newly created connector registration: the same callback failure occurs.

    Correlated desktop diagnostics

    All times below are UTC on October 19, 2026. These are safe extracted facts, not raw OAuth URLs or payloads.

    Existing connector attempt:

    • Pending OAuth attempt registered: 14:44:13.291Z.
    • Callback recognized: 14:44:17.537Z, with callbackOwned=true.
    • Callback API returned HTTP 404: 14:44:17.914Z.
    • Diagnostic ID: 126f2b99-edc1-4adb-a9b4-ffda6e2813c4.

    Fresh connector registration:

    • Pending OAuth attempt registered: 15:13:53.287Z.
    • Callback recognized: 15:13:56.538Z.
    • Same callback API returned HTTP 404: 15:13:56.772Z.
    • Diagnostic ID: 8c213567-bf24-4769-8d57-79ca0e1601e5.

    The failure follows a newly registered pending attempt by approximately 3–5 seconds. An old browser tab or simple state expiry has not been established as the explanation.

    Working comparisons and evidence limits

    • The user completed connection of the same Staging integration in ChatGPT web.
    • A separate, direct Codex MCP connection to the same Staging endpoint completed a fresh native OAuth login using CIMD: codex mcp login propensity-forge-staging --oauth-client-registration cimd. The native process returned exit code 0 and its successful-login message.
    • A subsequent direct authenticated MCP read succeeded; correlated service logs recorded accepted access validation and successful authentication. The running MCP client may have retained an earlier valid token, so this read does not independently prove use of the newly saved credential. Native login success is a separate observation.
    • Existing hosted plugin authenticated reads also succeeded later. This does not establish a successful new/reconnect OAuth flow; the callback failure remains unresolved and the reason existing access became available was not established.
    • The retained service-log tail did not cover the failed callback times. We do not claim that the MCP received no authorization request or that token exchange never occurred.

    Expected behavior and impact

    Codex desktop should complete the freshly initiated OAuth connection and make the custom MCP available without requiring repeated connector recreation or an alternate connection method. Troubleshooting this blocked work for approximately two hours.

    Please investigate why the hosted callback state lookup returns 404 for a callback that the desktop recognizes as belonging to its fresh pending attempt. The verified failure boundary is the hosted callback API; the underlying missing-state cause is not yet established.

    Related report: #54626, which includes the same callback route and HTTP 404. This reproduction is added here because the primary problem is OAuth connection completion, rather than deletion of the plugin definition.

    No credentials, authorization codes, tokens, raw state values, source code, or private application payloads are included in this report. Submitted on the affected user's behalf with their authorization.

  7. zaliubovskyio-prog commented on Oct 19, 2026

    @zaliubovskyio-prog

    Title: Windows desktop: connector OAuth callback returns 404 "OAuth state not found" after fresh sign-in

    Application: 26.1013.40934, build 20770, production channel
    Windows package: OpenAI.Codex 26.1013.4894.0, x64
    Configured application updater: up_to_date on 2026-10-19

    Problem:
    Connector onboarding/reconnection in the desktop app fails with "OAuth state not found". The owner has observed the same symptom with several providers, including Webflow and Meta. Existing linked-account API reads can still succeed; they do not validate new OAuth completion.

    Reproduction after fresh application sign-in:

    1. Sign out of the desktop application.
    2. Fully exit, restart and sign in again.
    3. Start connecting a new Webflow client account from the desktop app.
    4. Complete the provider's browser flow and return to the desktop app.
    5. The app displays "OAuth state not found".

    Sanitized evidence, 2026-10-19 UTC:
    17:48:02 — new main application process starts.
    17:49:30.149 — App connect OAuth pending state registered; host=electron.
    17:49:38.745 — App connect OAuth callback request started.
    17:49:38.985 — callback fails with "OAuth state not found".

    Earlier attempts in the same installed version returned HTTP 404 from POST /aip/connectors/links/oauth/callback with {"detail":"OAuth state not found"} at 16:52:02.439, 16:52:32.578, 16:52:54.078 and 17:25:59.047 UTC. Corresponding callback ownership was true.

    Checks performed:

    • Exactly one main desktop process; other ChatGPT processes are Electron child processes.
    • The installed package registers the codex protocol, and callbacks are received by the application.
    • The Windows clock matches an independent UTC clock within observation latency.
    • Fresh sign-out/restart/sign-in did not resolve the failure.
    • Read-only inspection of packaged source shows browserStateSaved:false is a constant desktop log field, not proof of an actual failed persistence operation.

    Important limits:

    • No underlying root cause has been established.
    • A browser-initiated experiment reached provider consent but was not completed, so browser completion is not claimed to work.
    • Existing-account API reads are not evidence that this onboarding bug is fixed.
    • No authentication stores, cookies, credentials, OAuth state, or security checks were changed.

    Request:
    Please investigate the native start/callback path, including how pending state is associated with application session/workspace/product context, and provide a supported remedy. A callback 404 in under nine seconds after registration still occurs after fresh sign-in.

    This report omits account IDs, local usernames, client sites, OAuth state/code values, tokens, raw callback URLs and chat contents.

  8. zaliubovskyio-prog commented on Oct 19, 2026

    @zaliubovskyio-prog

    Follow-up to my reproduction above: I also evaluated the browser-session workaround described in #55314. The existing ChatGPT web session was signed out through the normal UI, then signed in again to the same existing OpenAI account. The authenticated profile returned and its profile menu became available. The affected user then repeated the desktop Webflow connection flow and reported the same "OAuth state not found" error.

    Thus, neither fresh desktop sign-in nor fresh ChatGPT web sign-in resolved this instance. The later failure is the owner’s direct report; I have not yet correlated it with a newly flushed callback log entry. The underlying cause remains unconfirmed. No OAuth state validation, credentials, cookies, or application binaries were modified.

  9. tkawahara-ship-it commented on Oct 20, 2026

    @tkawahara-ship-it

    Additional reproduction with the Slack plugin on Codex desktop for Windows (2026-10-20 JST).

    • App version: 26.1013.40934, build 20770, production channel. The configured updater reports up_to_date.
    • From the desktop plugin connection flow, the user repeatedly received OAuth state not found, including after following the normal reconnect flow.
    • Immediately after an authentication attempt, a Slack plugin tool reported: "Authentication for Slack was requested and accepted. Retry this tool call now." Retrying returned USER_NOT_LOGGED_IN with "app is not connected". The same disconnected result was reproduced on a later check.
    • The standalone Slack Windows app itself was usable and the requested channel was readable. This does not establish that the plugin OAuth connection succeeded.

    Expected: completing the desktop OAuth flow should establish the Slack plugin connection and allow a read-only tool call. Actual: the desktop flow displays OAuth state not found, and subsequent plugin reads remain unauthenticated.

    I have not inspected callback HTTP traffic or OAuth state, and I am not claiming a root cause. This report omits account identifiers, workspace IDs, tokens, authorization codes, raw callback URLs, and chat content. Submitted on the affected user's behalf with their authorization.

  10. bdharris26 commented on Oct 20, 2026

    @bdharris26

    Additional reproduction with a custom Sites-hosted MCP plugin in the Windows app:

    1. In plugin management, Connect showed a persistent loading ring and couldn’t be clicked.
    2. Restarting the app made Connect clickable again.
    3. Clicking it opened the browser for authentication, which appeared to report success and returned me to the app.
    4. The app then displayed the “OAuth state not found.”

    I also encountered the same error when attempting connection through ChatGPT web on Windows. Repeated reconnections have not restored plugin access.

  11. djderex commented on Oct 21, 2026

    @djderex

    same issue here while trying to install Slack plugin in chatgpt windows app . It works to connect and use on the chatgpt web, but even connecting on web first it does not work in windows app. i get OAuth state not found

  12. LilCoderAsian commented on Oct 21, 2026

    @LilCoderAsian

    So, I was able to get OpenAI Developers and OpenAI Platform working on my windows setup.

    However, this is not necessarily a universal fix. I found two independent failure modes, so please only apply the cache/process part if your logs show the same file lock error.

    Environment

    • Windows 11 Pro
    • Codex CLI/app server 0.163.0
    • OpenAI Developers 1.3.6
    • ChatGPT Plus

    Fail 1 - plugin installation failed before OAuth

    Codex /plugins initially failed with:

    Failed to install plugin: plugin/install failed in TUI
    

    With TUI logging enabled, the underlying error repeatedly contained:

    failed to remove stale remote plugin cache entry
    ...\openai-developers
    file is being used by another process
    (os error 32)
    

    Windows resource monitor -> CPU -> Associated handles -> search openai-developers identified the exact process holding the cache.

    In my case it was:

    node.exe ./mcp/server.mjs
    

    with the Codex desktop app server as its parent.

    I stopped only that specifically verified stale MCP child, confirmed the handle was gone, and moved the stale openai-developers cache directory aside rather than deleting it.

    After that, /plugins successfully installed OpenAI Developers 1.3.6.

    Do not blindly kill all node.exe/codex.exe processes.
    If your log does not show os error 32 together with a message saying that the openai-developers cache file/directory is being used by another process, this branch probably does not apply to you.

    Fail 2 - Desktop OAuth still returned OAuth state not found

    After installation, connecting OpenAI Platform directly from desktop completed the browser authentication flow, but the callback still ended with:

    OAuth state not found
    

    What worked for me was initiating the underlying app connection from GPT WEB instead of desktop:

    1. On GPT web, open Plugins and select OpenAI Developers
    2. On the OpenAI devs plugin page, look for the Apps section
    3. Find the OpenAI Platform row
    4. Click the Connect button on the far right of that OpenAI Platform row
    5. Complete the OAuth flow in the browser
    6. Fully quit GPT/codex desktop
    7. Start GPT desktop again

    After restart, OpenAI Platform showed the connected account and OpenAI Developers remained installed/enabled.

    This is slightly different from only signing into GPT web and then retrying desktop OAuth: the successful OAuth flow itself was initiated from the web app.

    Verifying without creating an API key

    In desktop:

    OpenAI Developers -> Open plugin / Try in a chat -> "Create an OpenAI API key to use in this project".

    The secure Platform widget successfully loaded my actual platform organization and project selections. This gives a simple account specific read verification without performing a write.

    Additional independent verification

    Codex app server reported:

    OpenAI Developers:
      version: 1.3.6
      installed: true
      enabled: true
    
    OpenAI Platform:
      enabled: true
      callable: true
    
    FINAL CODEX VERIFICATION
    OpenAI Developers installed/enabled: PASS
    OpenAI Platform installed snapshot: PASS
    OpenAI Platform enabled: PASS
    OpenAI Platform callable: PASS
    
    OVERALL: PASS
    

    The MCP runtime exposed OpenAI Platform tools with no tools error.

    I also verified real platform tool invocation from both Codex CLI and Codex desktop.

    Important observations

    1. A Cloudflare 403 from app/list does not necessarily mean OAuth is broken. In my case, app/installed still showed OpenAI Platform as enabled and callable.

    2. Some OpenAI Platform tools were present in backend MCP inventory, but the desktop model reported those exact tools as unavailable. Because no tool call was attempted in those cases, this appears to be a tool exposure or routing difference rather than an OAuth failure.

  13. valar3700-debug commented on Oct 21, 2026

    @valar3700-debug

    I also encountered the "OAuth state not found" error when installing OpenAI Developers on my computer's desktop. Later, I tried the web version of the OpenAI Developers plugin page, but couldn't find a connection button under app:OpenAI Platform. However, I was able to install and successfully connect using the mobile version of ChatGPT. After installing and connecting on my phone, the desktop version automatically synchronized and worked normally as well. I hope this helps you.

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

    appauthbugskillswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions