openai/codex · error · WorkloadIdentitySessionError

a different workload identity configuration is already activ

Error message

a different workload identity configuration is already active in this process

What it means

Error "a different workload identity configuration is already active in this process" thrown in openai/codex.

Source

Thrown at codex-rs/login/src/auth/workload_identity.rs:115

        )?;
        WorkloadIdentityExchange::new(config, self.token_url, self.http_client_factory)
    }
}

#[derive(Clone, PartialEq, Eq)]
struct WorkloadIdentityFingerprint {
    assertion_file: PathBuf,
    environment: WorkloadIdentityEnvironment,
    federation_rule_id: String,
    token_url: String,
    workload_identity_context: Option<String>,
}

#[derive(Debug, Error)]
pub(super) enum WorkloadIdentitySessionError {
    #[error(transparent)]
    Exchange(#[from] WorkloadIdentityError),
    #[error("a different workload identity configuration is already active in this process")]
    ConflictingConfiguration,
    #[error("the workload identity process-session registry is unavailable")]
    RegistryUnavailable,
    #[error("{0}")]
    InvalidConfiguration(String),
}

/// Returns whether workload identity was selected through process configuration.
///
/// Either marker selects workload identity. Partial configuration then fails validation rather
/// than falling back to another credential source.
pub fn is_workload_identity_selected() -> bool {
    ProcessEnvironment::read().has_marker()
}

fn resolve_config(
    chatgpt_base_url: &str,
    environment: ProcessEnvironment,

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/login/src/auth/workload_identity.rs:115 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/b8efdb3385274a3e. Report an issue: GitHub.