Skip to content

Codex repeatedly opens Notion MCP OAuth windows despite Notion not being registered #27359

Open

Description

@SherifNeamatalla

This is a seriously broken and unacceptable OAuth/MCP behavior in Codex.

Codex repeatedly opened multiple Notion authorization windows in the browser, apparently trying to authenticate a Notion MCP connection that was not present in the active Codex MCP config. The active config had no Notion MCP server registered, yet Codex still behaved as if it needed to authenticate Notion, creating an infinite auth loop.

This happened after Notion had already been authenticated previously. The only workaround was to manually remove stale Notion references from Codex state/config/cache, then re-add the MCP later. That is not a reasonable user experience. OAuth state, MCP registration state, and connector startup behavior are clearly getting out of sync.

Expected:

  • If Notion MCP is not registered in active config, Codex must not attempt Notion OAuth.
  • If OAuth state is stale, Codex should fail once with a clear error and remediation path.
  • Codex must not repeatedly open browser auth windows without an explicit user action.
  • Stale backup config/history/session references must not trigger MCP startup or OAuth.

Actual:

  • Browser repeatedly opened Notion authorization pages.
  • Active MCP config did not contain Notion.
  • User had to manually purge Codex state/config references to stop the loop.

Impact:
This is disruptive, noisy, and makes Codex feel unsafe to leave running. It also creates confusion about what MCP servers are actually active. Please fix the MCP/OAuth state reconciliation and add guardrails so stale Notion references cannot trigger repeated auth attempts.

Activity

  1. added
    bug
    CLI
    mcp
    auth
    config
    on Jun 10, 2026
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

    CLIauthbugconfigmcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions