openai/codex · error · anyhow::Error

OAuth credential store pinned concurrently for MCP server `{

Error message

OAuth credential store pinned concurrently for MCP server `{oauth_server_name}`

What it means

Error "OAuth credential store pinned concurrently for MCP server `{oauth_server_name}`" thrown in openai/codex.

Source

Thrown at codex-rs/rmcp-client/src/rmcp_client.rs:1073

                            // initial construction below evaluates configured store policy.
                            return store
                                .load(&DefaultKeyringStore, &oauth_server_name, &oauth_url)
                                .map(|tokens| tokens.map(|tokens| ResolvedOAuthTokens { tokens, store }));
                        }

                        match resolve_oauth_tokens_from_store_policy(
                            &DefaultKeyringStore,
                            &oauth_server_name,
                            &oauth_url,
                            oauth_store_mode,
                            oauth_keyring_backend_kind,
                        ) {
                            Ok(tokens) => {
                                if let Some(resolved) = tokens.as_ref() {
                                    // Retries and session recovery rebuild this transport. Pin the
                                    // first concrete source so Auto is not reevaluated mid-client.
                                    pinned_credential_store.set(resolved.store).map_err(|_| {
                                        anyhow!(
                                            "OAuth credential store pinned concurrently for MCP server `{oauth_server_name}`"
                                        )
                                    })?;
                                }
                                Ok(tokens)
                            }
                            Err(err) => {
                                warn!(
                                    "failed to read tokens for server `{oauth_server_name}`: {err}"
                                );
                                Ok(None)
                            }
                        }
                    })
                    .await
                    .map_err(|error| anyhow!("OAuth credential loading task failed: {error}"))??
                } else {
                    None

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/rmcp-client/src/rmcp_client.rs:1073 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/5c032aedd6f3551b. Report an issue: GitHub.