Skip to content

Cannot delete Custom MCP Plugins #54626

Open

Description

@AlexWFreitas

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

26.1013.31256

What subscription do you have?

$100

What platform is your computer?

Microsoft Windows NT 10.0.26300.0 x64

What issue are you seeing?

When I installed a MCP through a Custom Server adress using OAuth it fails and using the OAuth authentication and going back to Codex, it causes this error:

"OAuth state not found"

Image

After that it says that the MCP was not installed and when I try to delete the Plugin through Plugins Screen and then the MCP Detailed Panel, it causes an error saying that the plugin cannot be deleted.

Image

What steps can reproduce the bug?

  1. Create a Custom MCP that uses OAuth and is hosted on an URL
  2. Add the MCP to ChatGPT Web or Codex.
  3. Try to delete the plugin.
  4. This should cause an error at least on my system.

What is the expected behavior?

No response

Additional information

Subject: Cannot delete two custom MCP plugins; OAuth callback reports “state not found”

I created two custom MCP plugins in Codex/ChatGPT. Both permanent-deletion attempts fail:

The captured deletion response for the MCP is:

{
  "detail": {
    "type": "apps_sdk_error",
    "error_code": "conflict",
    "message": "Remove this app from the published plugin before deleting it."
  }
}

I only added custom MCP servers; I never published a plugin. Account-level plugin read/search/sharing lookups expose the two cloud entries but no separate parent plugin or editable association. Uninstalling MCP did not remove its definition or resolve deletion.

Installation also reports “OAuth state not found” after submitting the activation code. Codex logs show HTTP 404 from POST /aip/connectors/links/oauth/callback.

On October 16, 2026, we compared four completed OAuth round trips. In every case, the MCP returned the exact incoming state value to the exact requested callback URL. No state values, authorization codes, or tokens are included here.

Please investigate the callback-state lookup failure, identify and clear the blocking published-plugin association, and permanently delete both custom plugin definitions and their connections.

Thank you.

Activity

  1. added
    app
    on Oct 16, 2026
  2. added
    bug
    windows-os
    mcp
    skills
    auth
    on Oct 16, 2026
  3. AlexWFreitas commented on Oct 16, 2026

    @AlexWFreitas
    Author

    Codex Feedback Id is no-active-thread-01a14612-624e-79d3-a6a3-f24b7aaf0578

  4. beifangzhishi-ops commented on Oct 17, 2026

    @beifangzhishi-ops

    I can reproduce the permanent deletion failure on ChatGPT Web (October 17, 2026) with my custom OAuth MCP integration, even when OAuth authentication and MCP tool calls work normally.

    Reproduction:

    1. Create a custom OAuth MCP app/plugin (tested with a private test plugin named ccm2).
    2. In the plugin management UI, select Delete plugin. The confirmation dialog fails with the Chinese UI message “未成功删除插件。请重试” (“Failed to delete plugin. Please try again”).
    3. On the associated app's management page, select Delete app. That also fails: “无法更新应用。请重试” (“Unable to update app. Please try again”).
    4. Uninstall the plugin, then reinstall it and retry permanent deletion. Both deletion paths still fail. Uninstall works, but the private plugin/app definitions remain.
    5. I uninstalled the test integration again afterward; the permanent plugin definition still exists.

    I have observed the same failure with two private custom MCP plugins (CCM and ccm2). I checked the private plugin metadata and confirmed their definitions still exist after the UI errors.

    Important distinction from the initial report: My MCP connection works, so the inability to delete seems independently reproducible without an OAuth callback-state error. I have not captured a server-side deletion error code, so I cannot confirm that the backend returns the same apps_sdk_error: conflict response reported above.

    Expected: The plugin owner should be able to permanently remove their own custom MCP plugin and its associated app, regardless of installation state.

    Please investigate the deletion/association lifecycle and support permanently deleting these definitions.

  5. Vizards commented on Oct 17, 2026

    @Vizards

    Also reproduced on macOS (Codex desktop 26.1013.40934) and ChatGPT Web.

    The affected private plugin was created from a custom OAuth MCP connection and later updated via package upload. It is now uninstalled, but its definition remains.

    Attempts and results:

    • Both UI deletion paths fail. DELETE /ps/plugins/{plugin_id} returns HTTP 409: “Remove this app from the published plugin before deleting it.”
    • Uploading a new package without the app reference is rejected: “Plugin upload must contain exactly the existing canonical app.”
    • Workspace deletion/sharing endpoints require an active workspace; this entry is USER / PRIVATE.
    • The Platform publication portal cannot find the plugin or app, so its unpublish controls are unavailable.
    • Removing local MCP/skills from the package restored the normal app settings page, but deletion still failed.

    This leaves the owner unable to remove the required app reference or delete the plugin. I cannot confirm whether the package update contributed to the problem. Please investigate the cleanup of personal canonical plugin/app associations.

  6. loic-thomas commented on Oct 17, 2026

    @loic-thomas

    I’m experiencing the exact same deletion issue with two personal custom MCP plugins created in ChatGPT: CntX and CntX Prod.

    Both plugins cannot be permanently deleted through the ChatGPT Web UI, which displays: “Failed to delete plugin. Please try again.”

    Backend error

    I inspected Chrome DevTools (Network tab) and confirmed the following response:

    Request:
    DELETE https://chatgpt.com/backend-api/ps/plugins/plugin_asdk_app_6ad1f4905f208191840932e09e137ee3

    Status: 409 Conflict

    Response:

    {
      "detail": {
        "type": "apps_sdk_error",
        "error_code": "conflict",
        "message": "Remove this app from the published plugin before deleting it."
      }
    }

    This is the exact same backend error reported in the original issue.

    Additional troubleshooting

    • I attempted to remove the associated app and MCP server from the existing plugin definitions.
    • These attempts did not resolve the deletion problem.
    • Both plugins are personal/private, and I cannot find any option in the UI to remove the blocking published-plugin association.
    • I have also contacted OpenAI Support about this issue.

    Environment

    • OS: Windows 11 (64-bit)
    • Browser: Google Chrome 155.0.8059.80 (Official Build, 64-bit)
    • Platform: ChatGPT Web (chatgpt.com)
    • Date reproduced: October 17, 2026
    • HTTP status: 409 Conflict
    • Backend error: apps_sdk_error / conflict

    Expected behavior

    Plugin owners should be able to permanently delete their personal custom MCP plugins and associated apps, even after uninstalling them, without encountering a blocking association that cannot be removed through the available UI.

    Conclusion

    This appears to be a reproducible backend plugin/app association lifecycle issue, rather than an OAuth-specific problem.

    Since the HTTP status code and backend error message match the original report exactly, this provides an independent reproduction of the same deletion failure.

    It would be helpful if the OpenAI team could investigate and provide a way to remove these orphaned or blocking associations so users can permanently delete their custom plugins.

  7. AlexWFreitas commented on Oct 17, 2026

    @AlexWFreitas
    Author

    Just to add more information from my side, the OAuth state not found bug appears to happen only in Codex, when I tried on ChatGPT Web the installation process seems to work normally for me.

    I think the OAuth state not found error is not related to the Delete Plugin error.

    After installing through ChatGPT Web, I was able to call the MCP tools in a chat despite those other bugs. Even in Codex.
    If I try to install through Codex, it does not work and the MCP does not change state to installed because of the OAuth state not found error.

    After trying again today, the delete plugin error is still happening, I now have 6 MCP / Plugins added that I cannot delete from my account.

  8. cyberianin commented on Oct 17, 2026

    @cyberianin

    Additional reproduction: Firecrawl OAuth fails in Codex Desktop but succeeds in ChatGPT Web

    I can independently reproduce the OAuth state not found error on Windows when connecting the official Firecrawl integration through ChatGPT/Codex Desktop.

    Importantly, the same integration can be connected successfully through ChatGPT Web, after which it also works in Codex Desktop.

    Environment

    • OS: Windows 10 Enterprise LTSC 21H2, x64
    • Client: ChatGPT Desktop / Codex for Windows
    • Default browser: Google Chrome
    • Integration: Firecrawl (official ChatGPT plugin)

    Steps to reproduce

    1. Open ChatGPT/Codex Desktop on Windows.

    2. Attempt to connect Firecrawl from within the desktop application.

    3. The application opens Google Chrome for the Firecrawl OAuth authorization flow.

    4. Approve the requested access in the browser.

    5. The authorization flow redirects back to the ChatGPT desktop application.

    6. The desktop application displays the error:

      OAuth state not found

    7. The connection initiated from Desktop is not successfully completed.

    Successful control: ChatGPT Web

    1. Open https://chatgpt.com directly in Google Chrome.
    2. Connect the same Firecrawl integration using the same accounts.
    3. Complete the OAuth authorization flow.
    4. The integration connects successfully.
    5. Return to Codex Desktop.
    6. Firecrawl is now available and works in the desktop application without another authorization attempt.

    Actual behavior

    OAuth authorization initiated from the desktop application fails during the return/callback stage, even though the external authorization page works.

    Starting the same connection from ChatGPT Web succeeds, and the resulting connection is usable in Codex Desktop.

    This suggests that the issue is specific to the desktop-initiated OAuth state/callback flow rather than Firecrawl API functionality or the integration itself.

    This is a hypothesis, not a confirmed root cause.

    Expected behavior

    The desktop application should be able to initiate and complete the Firecrawl OAuth authorization flow without requiring the user to separately open ChatGPT Web and connect the integration there.

    If authorization fails, the application should report a meaningful error and allow the user to retry successfully.

    Workaround

    Connect Firecrawl through ChatGPT Web in a browser. Once authorization succeeds there, the integration becomes usable in Codex Desktop.

    The workaround is functional, but it does not resolve the broken desktop connection flow.

    Scope

    This reproduction involves an official third-party integration, not a manually configured custom MCP server.

    It provides an additional example of the same OAuth state error reported in this issue. The plugin deletion problem described in the original report was not tested.

  9. AlexWFreitas commented on Oct 18, 2026

    @AlexWFreitas
    Author

    More information:

    I tried connecting to the same MCP Server using MCP Inspector and I had no troubles connecting to it and was able to call tools normally.

  10. ptoledo commented on Oct 18, 2026

    @ptoledo

    Additional reproduction — ChatGPT Web, Linux, Firefox

    I can independently reproduce the permanent deletion failure with two personal custom MCP plugins.

    Environment:

    • Platform: ChatGPT Web
    • OS: Linux
    • Browser: Firefox
    • Date: October 18, 2026

    Observed behavior:

    Both plugins appear under Personal → Created by you, but neither is currently installed.

    Attempting to permanently delete a plugin results in:

    Couldn't delete plugin. Try again.

    Firefox Developer Tools confirms that the DELETE request returns HTTP 409 Conflict:

    {
      "detail": {
        "type": "apps_sdk_error",
        "error_code": "conflict",
        "message": "Remove this app from the published plugin before deleting it."
      }
    }

    Additional observations:

    • Both custom plugin definitions reference the same MCP server.
    • The MCP integration previously worked successfully.
    • The deletion failure occurs independently of OAuth authentication problems.
    • No mechanism is available in the UI to remove the blocking plugin/app association.

    Expected behavior:

    Users should be able to permanently delete their own private custom MCP plugins, regardless of their installation state.

    This confirms the same backend conflict reported by other users, now also reproduced on Linux with Firefox.

  11. yoonpooh commented on Oct 19, 2026

    @yoonpooh

    Reproduced on ChatGPT Web, macOS, Chrome, October 20, 2026 (KST) with a personal custom MCP plugin.

    One difference from the original report: the affected integration uses no OAuth. Its settings show authentication as None. The deletion failure therefore also occurs without an OAuth callback flow.

    The private definition reports scope: USER, discoverability: PRIVATE, and review status DEVELOPMENT.

    Both deletion paths return HTTP 409:

    • Plugins directory → Delete plugin: DELETE /backend-api/ps/plugins/{plugin_id}
    • Settings → plugin → Delete app: DELETE /backend-api/aip/connectors/{app_id}

    Both return:

    {
      "detail": {
        "type": "apps_sdk_error",
        "error_code": "conflict",
        "message": "Remove this app from the published plugin before deleting it."
      }
    }

    I also tried:

    • Reinstalling the plugin, then deleting it from Settings. Deletion still failed. I uninstalled it again afterward.
    • Uploading a package without the app reference. The server rejected it with Plugin upload must contain exactly the existing canonical app. No package update was accepted.
    • Checking the Platform plugin submission portal. The affected private definition is not listed in my Personal Organization, so there is no publication to remove there.
    • The separate workspace deletion route used by the client. It returned HTTP 400: Workspace plugin creation requires an active workspace.

    Current state: uninstall succeeds, but the private plugin/app definition remains under Personal → Created by you.

    Please fix the personal canonical plugin/app deletion flow, or provide a supported cleanup operation that removes the blocking association and deletes both definitions. The owner currently cannot satisfy the deletion requirement: removing the app reference is itself rejected.

    Account identifiers, integration IDs, endpoint URLs, and credentials are omitted from this public report.

  12. AlexWFreitas commented on Oct 20, 2026

    @AlexWFreitas
    Author

    I thought they fixed the problem but at least one of my MCP / Plugins is not able to be deleted.

  13. AlexWFreitas commented on Oct 20, 2026

    @AlexWFreitas
    Author
    {
      "detail": {
        "type": "apps_sdk_error",
        "error_code": "conflict",
        "message": "App plugin has a non-generated release."
      }
    }

    I think I uploaded a zip file to update the plugin and this broke the delete plugin logic.

  14. ptoledo commented on Oct 20, 2026

    @ptoledo

    Additional reproduction — ChatGPT Web, Linux, Firefox

    I can independently reproduce the permanent deletion failure with two personal custom MCP plugins.

    Environment:

    * Platform: ChatGPT Web
    
    * OS: Linux
    
    * Browser: Firefox
    
    * Date: October 18, 2026
    

    Observed behavior:

    Both plugins appear under Personal → Created by you, but neither is currently installed.

    Attempting to permanently delete a plugin results in:

    Couldn't delete plugin. Try again.

    Firefox Developer Tools confirms that the DELETE request returns HTTP 409 Conflict:

    {
    "detail": {
    "type": "apps_sdk_error",
    "error_code": "conflict",
    "message": "Remove this app from the published plugin before deleting it."
    }
    }

    Additional observations:

    * Both custom plugin definitions reference the same MCP server.
    
    * The MCP integration previously worked successfully.
    
    * The deletion failure occurs independently of OAuth authentication problems.
    
    * No mechanism is available in the UI to remove the blocking plugin/app association.
    

    Expected behavior:

    Users should be able to permanently delete their own private custom MCP plugins, regardless of their installation state.

    This confirms the same backend conflict reported by other users, now also reproduced on Linux with Firefox.

    I just tried to delete the plugins this morning and worked without problem.

  15. AlexWFreitas commented on Oct 20, 2026

    @AlexWFreitas
    Author

    I don't know if we should close this issue.

    From what I am seeing the OAuth state not found bug on Codex still happens.
    And there is another bug where you cannot delete a MCP / Plugin you created if you updated the version through a zip file on ChatGPT Web. Even if the uploaded zip file is the same as the one you downloaded from ChatGPT itself.

  16. loic-thomas commented on Oct 20, 2026

    @loic-thomas

    The earlier 409 ("Remove this app from the published plugin before deleting it.") is fixed for some of my personal plugins.

    For two others that received a manual ZIP upload (“Upload new version” on ChatGPT Web), delete still fails with a different 409:

    { "detail": { "type": "apps_sdk_error", "error_code": "conflict", "message": "App plugin has a non-generated release." } }

    Reproduced on ChatGPT Web / Chrome / 20 Oct 2026:

    DELETE /backend-api/ps/plugins/{plugin_id} → 409 + body above
    DELETE /backend-api/aip/connectors/{app_id} → 409 + same body
    Uninstall succeeds; permanent delete (plugin or app) does not.

    Same trigger as @AlexWFreitas: uploading a ZIP to update a personal plugin appears to leave a non-generated release that blocks owner delete afterward — even when the ZIP matches a previously downloaded package.

  17. AlexWFreitas commented on Oct 27, 2026

    @AlexWFreitas
    Author

    Delete bug seems to be fixed now. I did not check the OAuth state not found since I stopped using MCP for now.

  18. thoughtdna commented on Nov 17, 2026

    @thoughtdna

    Delete bug seems to be fixed now. I did not check the OAuth state not found since I stopped using MCP for now.

    nope still blocked from deleting on my side.

  19. jiangxiaoxu commented on Nov 17, 2026

    @jiangxiaoxu

    Adding a different deletion failure observed after deleting a Site (ChatGPT Web, Windows/Chrome, November 16, 2026).

    The associated plugin record remained, but its canonical app/connector was missing:

    • GET /backend-api/ps/plugins/{plugin_id} -> 200.
    • GET /backend-api/aip/connectors/{app_id} -> 404, Connector not found.
    • DELETE /backend-api/ps/plugins/{plugin_id} -> 404:
    {"detail":{"type":"apps_sdk_error","error_code":"not_found","message":"Service connector instance not found."}}

    After confirming deletion, the dialog keeps spinning with both buttons disabled. Reloading restores interaction, but the plugin remains. Reinstalling fails with Unable to load connector; uploading a package without the app reference is rejected with Plugin upload must contain exactly the existing canonical app.

    Expected: deleting a Site should not leave an undeletable plugin reference. If the plugin is retained, its owner should still be able to delete it, and failed deletion should clear the loading state.

    This is a 404 variant, rather than the earlier 409 association conflict; a shared cause is unconfirmed.

    Affected plugin: plugin_asdk_app_sites_d850b2e64b14819180a370ce3ab55cd5
    App: asdk_app_sites_d850b2e64b14819180a370ce3ab55cd5

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

    appauthbugmcpskillswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions