Skip to content

MCP OAuth login does not persist across Codex restarts; remote MCP startup incomplete #15122

@petabook

Description

@petabook

What version of Codex CLI is running?

0.115.0

What subscription do you have?

Business

Which model were you using?

gpt-5.4

What platform is your computer?

Darwin 25.2.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

ghostty

What issue are you seeing?

Title: MCP OAuth login does not persist across Codex restarts; remote MCP startup incomplete

Summary

After successfully authenticating an OAuth-based MCP server with codex mcp login asana, starting a new Codex session reports:

The asana MCP server is not logged in. Run codex mcp login asana.

At the same time, other configured MCP servers fail during startup/handshake.

Environment

  • Codex CLI version: 0.115.0
  • Install path: /opt/homebrew/bin/codex
  • OS: macOS
  • HOME: /Users/snd
  • CODEX_HOME: unset
  • Config path: ~/.codex/config.toml
  • Auth cache path: ~/.codex/auth.json

Config

model = "gpt-5.4"

[mcp_servers.asana]
url = "https://mcp.asana.com/v2/mcp"

[mcp_servers.sentry]
url = "https://mcp.sentry.dev/mcp"

[mcp_servers.newrelic]
url = "https://mcp.newrelic.com/mcp/"

### What steps can reproduce the bug?

Configure remote MCP servers in `~/.codex/config.toml`
Run `codex mcp login asana`
Complete OAuth successfully
Start Codex with `codex`

### What is the expected behavior?

Codex should reuse the stored OAuth session and start with the Asana MCP server authenticated.

### Additional information

⚠ MCP client for `newrelic` failed to start: MCP startup failed: handshaking with MCP server failed: Send message error Transport ... error decoding response body, when send initialize request

⚠ MCP startup incomplete (failed: asana, newrelic)

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues related to authentication and accountsbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) servers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions