Hmbown/CodeWhale · error

Codex OAuth credentials are only available on the official O

Error message

Codex OAuth credentials are only available on the official OpenAI Codex route

What it means

Error "Codex OAuth credentials are only available on the official OpenAI Codex route" thrown in Hmbown/CodeWhale.

Source

Thrown at crates/tui/src/config.rs:10821

    // Last resort: the user-global config file. A key saved there must not
    // disappear just because this process loaded a workspace config.
    if user_global_config_api_key(provider).is_some() {
        return true;
    }

    false
}

impl Config {
    /// Resolve one coherent Codex OAuth snapshot. The bearer and account id
    /// must come from the same secure file handle; opening the external JSON a
    /// second time could pair identities across an atomic owner refresh or a
    /// hostile path swap.
    pub(crate) fn codex_credentials(&self) -> Result<crate::oauth::CodexCredentials> {
        if let Some(credentials) = crate::oauth::credentials_from_env() {
            return Ok(credentials);
        }
        anyhow::ensure!(
            self.api_provider() == ApiProvider::OpenaiCodex
                && !self.provider_uses_custom_endpoint(ApiProvider::OpenaiCodex),
            "Codex OAuth credentials are only available on the official OpenAI Codex route"
        );
        let path = crate::oauth::auth_file_path();
        let grant = self.external_credential_read_grant(
            ApiProvider::OpenaiCodex,
            codewhale_config::ExternalCredentialSource::CodexCli,
            &path,
        )?;
        crate::oauth::get_credentials(&grant)
    }

    /// ChatGPT account id for the already-selected Codex route. Environment
    /// metadata remains independent; the external file is read only when the
    /// exact provider/source/path consent tuple is valid.
    #[cfg(test)]
    pub(crate) fn codex_account_id(&self) -> Option<String> {

View on GitHub (pinned to 8880682c63)

When it happens

Trigger: Thrown at crates/tui/src/config.rs:10821 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/50c3a1f8b8a235b1. Report an issue: GitHub.