openai/codex · error · OAuthStoreLockFailure

failed to lock MCP OAuth {store} aggregate-store lock {}

Error message

failed to lock MCP OAuth {store} aggregate-store lock {}

What it means

Error "failed to lock MCP OAuth {store} aggregate-store lock {}" thrown in openai/codex.

Source

Thrown at codex-rs/rmcp-client/src/oauth/store_lock.rs:197

        source: io::Error,
    },
    #[error("failed to open MCP OAuth {store} aggregate-store lock {}", path.display())]
    Open {
        store: OAuthStore,
        path: PathBuf,
        #[source]
        source: io::Error,
    },
    #[error(
        "timed out after {acquire_timeout:?} waiting for MCP OAuth {store} aggregate-store lock {}",
        path.display()
    )]
    Timeout {
        store: OAuthStore,
        path: PathBuf,
        acquire_timeout: Duration,
    },
    #[error("failed to lock MCP OAuth {store} aggregate-store lock {}", path.display())]
    Lock {
        store: OAuthStore,
        path: PathBuf,
        #[source]
        source: io::Error,
    },
}

fn oauth_store_lock_path(codex_home: &Path, store: OAuthStore) -> PathBuf {
    codex_home.join(OAUTH_LOCK_DIR).join(store.lock_filename())
}

#[cfg(test)]
#[path = "tests/store_lock_tests.rs"]
mod tests;

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/rmcp-client/src/oauth/store_lock.rs:197 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/a43031f2b6ee732d. Report an issue: GitHub.