# OpenAI Developers "OAuth state not found": Connect From the Web

> OAuth state not found in the ChatGPT desktop app is an open OpenAI bug, not your account. Start the plugin connection on chatgpt.com or mobile, then restart.

- Source: https://www.aifreeapi.com/en/posts/codex-oauth-state-not-found
- Language: en
- Published: 2026-10-22
- Updated: 2026-10-22
- Publisher: AI Free API (https://www.aifreeapi.com)

`OAuth state not found` appears after you approve a plugin in the browser and land back in the ChatGPT desktop app (the Codex app). The browser side finished. The step that broke is OpenAI's own server matching your approval to the connection the app started, and that is an open bug. Nothing in the reports points to your account, your browser tab, or the provider you were connecting. As of October 22, 2026, none of the six GitHub reports filed since October 16 has a reply from OpenAI, and neither the [Codex changelog](https://learn.chatgpt.com/docs/changelog) nor [status.openai.com](https://status.openai.com) mentions it.

In the reports, retrying from the desktop app, signing out and back in, recreating the connector, and updating the app all failed. What has worked is completing the connection outside the desktop app and then restarting it so it picks the connection up: on chatgpt.com, in the ChatGPT mobile app, or, for your own MCP server, with the Codex CLI. These are user workarounds, not fixes from OpenAI, so each route below says how much evidence stands behind it.

If the error showed up while you were signing in to Codex itself (a `localhost:1455` page, `Token exchange failed`), you have a different problem: see [diagnosing Codex sign-in and token exchange failures](/en/posts/codex-access-token-could-not-be-refreshed).

## Which route fits what you were connecting

| You were connecting | Start here | Evidence as of October 22, 2026 |
| --- | --- | --- |
| OpenAI Developers, to set up an API key | chatgpt.com → Plugins → OpenAI Developers → Apps → OpenAI Platform → Connect, then fully restart the desktop app | One detailed user report |
| OpenAI Developers, but the web page shows no Connect button | Install and connect it in the ChatGPT mobile app, then reopen the desktop app | One user report |
| GitHub, Slack, Figma, Firecrawl, Webflow or another hosted plugin | Install and connect it at chatgpt.com/plugins, then reopen the desktop app | Worked for several users; failed for one Slack user and one custom MCP user |
| Your own remote MCP server | `codex mcp add` and `codex mcp login` in the Codex CLI | Commands are documented by OpenAI; one report that this login worked where the plugin flow failed |
| Nothing but an API key | Create one at platform.openai.com/api-keys and set `OPENAI_API_KEY` | OpenAI documentation |
| Install fails before any browser opens, with `plugin/install failed` | Check the log for `os error 32`, a separate file-lock problem | One user report |

Use the same ChatGPT account on the web, on mobile and in the desktop app. ChatGPT and Codex share one plugin directory ([OpenAI Developers plugin docs](https://developers.openai.com/learn/developers-codex-plugin)), and in the reports a connection made on the web or the phone carried over to the desktop app.

## What "OAuth state not found" means in the ChatGPT desktop app

When you click Install plugin or Connect, the app creates a one-time value called the OAuth state and opens your browser. After you approve, the browser hands the result back to the app, and ChatGPT's server looks up that state to tie the approval to your attempt. "Not found" means that lookup failed.

Two users posted desktop logs that show exactly where it stops ([#54924](https://github.com/openai/codex/issues/54924), October 19). The app registered the pending attempt, received the browser's return and recognized it as its own, then sent it to OpenAI's hosted endpoint `POST /aip/connectors/links/oauth/callback`, which answered HTTP 404 with `{"detail":"OAuth state not found"}`. The 404 came 3 to 9 seconds after the attempt started, and a freshly created connector registration failed the same way. A short gap like that makes an expired or stale browser tab an unlikely cause, though that is an inference from the logs. OpenAI has not published a root cause.

![Four steps of a plugin connection: the desktop app starts it, you approve in the browser, the app receives the callback, and OpenAI's hosted callback lookup returns HTTP 404 OAuth state not found](https://www.aifreeapi.com/posts/en/codex-oauth-state-not-found/img/oauth-callback-failure-point.webp)

The same toast hits many plugins, not only OpenAI Developers. Reports name GitHub ([#55314](https://github.com/openai/codex/issues/55314), [#55656](https://github.com/openai/codex/issues/55656)), Slack, Webflow and Meta ([#54924](https://github.com/openai/codex/issues/54924)), Figma ([#55139](https://github.com/openai/codex/issues/55139)), Firecrawl and custom OAuth MCP servers ([#54626](https://github.com/openai/codex/issues/54626)), plus OpenAI Developers again in [#55955](https://github.com/openai/codex/issues/55955). Affected builds include desktop app 26.1013.40934 and 26.1016.51333. Every GitHub report filed since October 16 involves the Windows desktop app, and one of those users also hit it on ChatGPT web. That doesn't prove other platforms are safe (see the FAQ).

These did not help in the reports, each tried by one or two people:

- restarting and signing in again
- signing out of the desktop app, exiting fully and signing back in
- signing out of and back in to ChatGPT on the web, then retrying from the desktop
- recreating the connector
- updating the app and retrying
- connecting Slack on the web first, then retrying the desktop connection

## OpenAI Developers: connect OpenAI Platform on chatgpt.com, then restart

The OpenAI Developers plugin bundles an app called OpenAI Platform. According to OpenAI's docs, that connection is what lets the plugin create project API keys for you, so it is the part that has to succeed. One Windows 11 user with ChatGPT Plus got it working on October 21 by starting that connection on the web ([#54924](https://github.com/openai/codex/issues/54924)):

1. Sign in at chatgpt.com in your browser with the same account as the desktop app.
2. Open **Plugins** and select **OpenAI Developers**.
3. On the plugin page, find the **Apps** section and the **OpenAI Platform** row.
4. Click **Connect** at the right end of that row and finish the OAuth approval in the browser.
5. Quit the desktop app completely. Closing the window may leave it running, so exit from the system tray icon as well if it's there.
6. Start the desktop app again. OpenAI Platform should now show your connected account, with OpenAI Developers still installed.

Evidence: one detailed report. The poster notes the difference that mattered: signing in on the web and retrying from the desktop did not work, but starting the OAuth flow itself on the web did.

![Four steps to connect OpenAI Platform from chatgpt.com: open the OpenAI Developers plugin, click Connect on the OpenAI Platform row, quit and reopen the desktop app, then check in a chat that the key widget loads your organization and project](https://www.aifreeapi.com/posts/en/codex-oauth-state-not-found/img/openai-platform-web-connect.webp)

### No Connect button under OpenAI Platform on the web: use the mobile app

Another user found no Connect button under OpenAI Platform on the web plugin page. Installing and connecting OpenAI Developers in the ChatGPT mobile app worked, and the desktop app then synced and worked normally ([#54924](https://github.com/openai/codex/issues/54924), October 21). Restart the desktop app after connecting on your phone if it doesn't show up right away.

Evidence: one report.

## GitHub, Slack, Figma and other plugins: install them from chatgpt.com/plugins

For hosted plugins, open the plugin directory in your regular browser instead of the desktop app, for example [chatgpt.com/plugins/?search=github](https://chatgpt.com/plugins/?search=github), then install and connect from there. After that, reopen the desktop app.

Reports where this worked, all from October 17 to 21, 2026:

- Firecrawl connected through ChatGPT web and then worked in Codex Desktop without another authorization ([#54626](https://github.com/openai/codex/issues/54626)).
- A custom OAuth MCP plugin installed through the web, and its tools were callable in Codex ([#54626](https://github.com/openai/codex/issues/54626)).
- GitHub installed through the web link ([#55656](https://github.com/openai/codex/issues/55656)).
- A second GitHub profile that kept failing from the desktop connected after a fresh flow started in the browser ([#55314](https://github.com/openai/codex/issues/55314)).

It did not work for everyone. One Slack user could connect and use Slack on the web, but the Windows app still showed the error afterward. One custom MCP user got `OAuth state not found` on ChatGPT web for Windows as well ([#54924](https://github.com/openai/codex/issues/54924)).

Evidence: several user reports, two counter-reports. Try it once, and if the desktop app still doesn't see the connection after a full restart, stop there and add your details to [#54924](https://github.com/openai/codex/issues/54924).

## Your own MCP server: log in with codex mcp login instead

If the plugin you were connecting is your own remote MCP server, you can skip the plugin connection and configure the server directly on the Codex host. The ChatGPT desktop app, Codex CLI and IDE extension share this MCP configuration in `~/.codex/config.toml`, and OAuth for Streamable HTTP servers supports both CIMD and DCR client registration ([Codex MCP docs](https://developers.openai.com/codex/mcp)).

```bash
codex mcp add my-server --url https://mcp.example.com/mcp
codex mcp login my-server
codex mcp list
```

Replace `my-server` and the URL with your own. If the default login fails, choose the registration method for one attempt:

```bash
codex mcp login my-server --oauth-client-registration cimd
codex mcp login my-server --oauth-client-registration dcr
```

One user whose desktop plugin connection kept failing finished `codex mcp login <server> --oauth-client-registration cimd` for the same server, and later reads succeeded ([#54924](https://github.com/openai/codex/issues/54924), October 19). The poster cautions that a cached token may have helped that later read. The CLI login returns to a local loopback address such as `http://127.0.0.1:<port>/callback/...` rather than the hosted callback that returns 404, which is likely why it avoids the bug. That reasoning is an inference, not something OpenAI has confirmed. Tools from a directly configured server can also behave differently from a hosted plugin's tools.

Evidence: documented commands, one report for this bug.

Avoid creating new custom plugins over and over while you retry. A separate open bug in [#54626](https://github.com/openai/codex/issues/54626) leaves some custom MCP plugins impossible to delete (HTTP 409 "Remove this app from the published plugin before deleting it."). It was fixed for some users by October 20, but plugins updated by ZIP upload still fail with "App plugin has a non-generated release." Uninstalling works; permanent deletion doesn't.

## Only needed an API key: create it on platform.openai.com

If OpenAI Developers was just your way to get an API key, you don't need the plugin connection for that. OpenAI's [quickstart](https://developers.openai.com/api/docs/quickstart) has you create a key in the dashboard at [platform.openai.com/api-keys](https://platform.openai.com/api-keys) and set it as an environment variable.

In Windows PowerShell:

```powershell
setx OPENAI_API_KEY "your_api_key_here"
```

On macOS or Linux:

```bash
export OPENAI_API_KEY="your_api_key_here"
```

`setx` saves the variable for new windows, so open a new terminal before you use it. This gets you the same kind of key, but it skips the plugin's guided steps for creating, saving and connecting a project key. The Agents SDK and troubleshooting skills belong to the plugin, and OpenAI's docs don't say whether they work while the OpenAI Platform connection is broken.

Keep the key in a local file or your environment. Don't paste it into a chat, an issue or a forum post.

## plugin/install failed with os error 32: a file lock, not OAuth

If installing OpenAI Developers fails before any browser window opens, you may not have the OAuth bug at all. One Windows user saw `Failed to install plugin: plugin/install failed` from `/plugins`, and the log repeatedly showed:

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

A leftover MCP process held the old plugin cache open. In that report it was `node.exe ./mcp/server.mjs`, a child of the Codex app server. Apply the following only if your log shows `os error 32` together with the `openai-developers` cache entry:

1. Open Resource Monitor (`resmon`), go to the **CPU** tab, and search **Associated Handles** for `openai-developers`.
2. Note the process holding it. Stop only that one process, and confirm the handle is gone.
3. Rename or move the stale `openai-developers` cache folder named in the log instead of deleting it.
4. Run the install from `/plugins` again.

Don't end every `node.exe` or `codex.exe` process. The same user then still hit `OAuth state not found` when connecting OpenAI Platform from the desktop and fixed that through the web route above ([#54924](https://github.com/openai/codex/issues/54924), October 21).

Evidence: one report.

A plugin directory that won't load at all, with "Failed to load plugins" and `cloudflare_challenge`, is another separate issue ([#55139](https://github.com/openai/codex/issues/55139)). Open chatgpt.com/plugins in your regular browser instead. A Cloudflare error there doesn't mean your existing connections broke: one user saw a Cloudflare 403 while listing apps, and OpenAI Platform stayed enabled and callable. If the desktop app itself won't start or loses its plugins after an update, see [Failed to Start Codex App-Server on Windows](/en/posts/codex-app-server-failed-to-start).

## Check the connection without creating an API key

A toast that goes away is not proof. Test the connection with a read-only action.

For OpenAI Developers, in the desktop app open **OpenAI Developers** → **Try in a chat** and ask: "Create an OpenAI API key to use in this project." If the connection works, the secure OpenAI Platform widget loads your organization and project choices. That is your check. Stop there and don't confirm creation unless you actually want a new key ([#54924](https://github.com/openai/codex/issues/54924)).

For other plugins, ask for something that only reads, such as listing your GitHub repositories or reading a Slack channel. If the answer is `USER_NOT_LOGGED_IN` or "app is not connected," the connection never completed, even if the plugin shows as installed. In one Slack case the tool first said authentication was accepted and then returned exactly that on the retry ([#54924](https://github.com/openai/codex/issues/54924)).

## When to stop retrying and what to put in a bug report

Stop retrying from the desktop app once you've done one clean attempt after a full restart. Nothing in the reports shows a repeated desktop retry eventually succeeding, and as of October 22, 2026 the cause, the fix date, and whether account or workspace settings play a part are all unknown. Use one of the routes above, and recheck the [Codex changelog](https://learn.chatgpt.com/docs/changelog) and [#54924](https://github.com/openai/codex/issues/54924) for a fix.

If you want to add your case, comment on [#54924](https://github.com/openai/codex/issues/54924) or the issue for your plugin rather than opening a new one, since new reports get flagged as duplicates. Useful details:

- desktop app version from the About dialog, and the Windows package version if you know it
- your Feedback ID, if the app gave you one (it starts with `no-active-thread-`)
- the UTC time of the failed attempt
- which plugin or provider you were connecting, and whether the web or mobile route worked

Leave out tokens, OAuth state and code values, full callback URLs, account IDs and chat contents. The existing reports were written that way, and none of those values are needed to investigate.

## OAuth state not found FAQ

### Is "OAuth state not found" caused by my GitHub, Slack or OpenAI account?

No evidence points there. The provider's approval completes, and the 404 comes from ChatGPT's own callback lookup. Reporters reproduced it across many providers, on ChatGPT Plus and Business Premium, and with freshly created connector registrations. Whether some account or workspace setting makes it more likely is still unknown.

### Does signing out and back in fix OAuth state not found?

Not in any report so far. Fresh sign-ins on the desktop and on the web both failed to fix it. The [#55314](https://github.com/openai/codex/issues/55314) title says signing in to ChatGPT on the web resolved it, but a later attempt to reproduce that for Webflow failed. What worked in more cases was starting the connection on the web, not just signing in there.

### Does OAuth state not found happen on Mac too?

The current wave of GitHub reports is all Windows desktop, and one Windows user saw it on ChatGPT web. It isn't proven to be Windows-only: in April 2026 a developer reported the same callback 404 on ChatGPT web with macOS and Chrome while setting up a custom MCP connector in developer mode ([OpenAI community thread](https://community.openai.com/t/chatgpt-mcp-connector-oauth-oauth-state-not-found-callback-fails-before-token-exchange/1378808)).

### Will a plugin connected on the web or phone work in the desktop app?

In the reports that worked, yes. Firecrawl, a custom MCP plugin, OpenAI Platform, and OpenAI Developers connected on mobile all showed up in the desktop app afterward, sometimes only after a full restart. It depends on using the same ChatGPT account everywhere.
