openai/codex · error · anyhow::Error

ChatGPT account ID not available, please re-run codex login

Error message

ChatGPT account ID not available, please re-run codex login

What it means

Error "ChatGPT account ID not available, please re-run codex login" thrown in openai/codex.

Source

Thrown at codex-rs/chatgpt/src/connectors.rs:147

    pub apps: Vec<ConnectorMetadata>,
    pub missing_app_ids: Vec<String>,
}

/// Reads display metadata without loading MCP connector tools or runtime state.
///
/// The store is created before awaiting the backend request, so a response that arrives after an
/// account or backend change can only commit to the scope under which it was requested.
pub async fn read_connector_metadata(
    config: &Config,
    auth: &CodexAuth,
    app_ids: &[String],
    include_tools: bool,
) -> anyhow::Result<ConnectorMetadataReadResult> {
    anyhow::ensure!(
        auth.uses_codex_backend(),
        "ChatGPT backend requests require Codex backend auth"
    );
    anyhow::ensure!(
        auth.get_account_id().is_some(),
        "ChatGPT account ID not available, please re-run codex login"
    );

    let store = ConnectorMetadataStore::new(
        config.chatgpt_base_url.clone(),
        auth.get_account_id(),
        auth.get_chatgpt_user_id(),
        auth.is_workspace_account(),
    );
    let mut metadata_by_id = store.fresh_records(app_ids, include_tools);
    let missing_ids = app_ids
        .iter()
        .filter(|app_id| !metadata_by_id.contains_key(app_id.as_str()))
        .cloned()
        .collect::<Vec<_>>();

    if !missing_ids.is_empty() {

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/chatgpt/src/connectors.rs:147 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/968bedddcb70b095. Report an issue: GitHub.