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

Open 💬 0 comments Opened Jun 10, 2026 by 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.

View original on GitHub ↗