openai/codex · error · anyhow::Error

secrets file version {} is newer than supported version {}

Error message

secrets file version {} is newer than supported version {}

What it means

Error "secrets file version {} is newer than supported version {}" thrown in openai/codex.

Source

Thrown at codex-rs/secrets/src/local.rs:199

        if let Some((cache, ciphertext_hash, passphrase_hash)) = cache.as_ref()
            && let Some(cached) = cache.as_ref()
            && cached.path == path
            && cached.ciphertext_hash == *ciphertext_hash
            && cached.passphrase_hash == *passphrase_hash
        {
            return Ok(cached.file.as_ref().clone());
        }
        let plaintext = decrypt_with_passphrase(&ciphertext, &passphrase)?;
        let mut parsed: SecretsFile = serde_json::from_slice(&plaintext).with_context(|| {
            format!(
                "failed to deserialize decrypted secrets file at {}",
                path.display()
            )
        })?;
        if parsed.version == 0 {
            parsed.version = SECRETS_VERSION;
        }
        anyhow::ensure!(
            parsed.version <= SECRETS_VERSION,
            "secrets file version {} is newer than supported version {}",
            parsed.version,
            SECRETS_VERSION
        );
        if let Some((mut cache, ciphertext_hash, passphrase_hash)) = cache {
            *cache = Some(CachedMcpSecrets {
                path,
                ciphertext_hash,
                passphrase_hash,
                file: Arc::new(parsed.clone()),
            });
        }
        Ok(parsed)
    }

    fn save_file(&self, file: &SecretsFile) -> Result<()> {
        let dir = self.secrets_dir();

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/secrets/src/local.rs:199 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/d12ba14d559c31bf. Report an issue: GitHub.