Hmbown/CodeWhale · error · anyhow::Error

codewhale_config::LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE

Error message

codewhale_config::LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE

What it means

The legacy Antigravity (AgyCli) external-credential reader has been retired: a legacy consent record deliberately validates to nothing and resolves no route. Any attempt to use it bails with a tombstone message defined in `codewhale_config::LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE`.

Solutions

  1. Delete or migrate the stale external-credential record referencing AgyCli
  2. Re-authenticate Antigravity access through a currently supported path if needed
  3. Read the tombstone message text for the migration guidance it embeds

Example fix

// before
{ "source": "agy-cli", ... }
// after
remove the record or re-grant via a supported ExternalCredentialSource
Defensive patterns

Strategy: validation

Validate before calling

if source == ExternalCredentialSource::AgyCli {
    eprintln!("Antigravity CLI import is retired; re-auth via a supported source");
    return;
}

Try / catch

match validate_external_credential(record) {
    Err(e) if e.to_string().contains("Antigravity") || e.to_string().contains("tombstone") => {
        eprintln!("legacy AgyCli consent record detected — remove or migrate it");
    }
    r => r?,
}

Prevention

When it happens

Trigger: A stored external-credential record with `ExternalCredentialSource::AgyCli` reaching the credential resolution/validation path (e.g. leftover consent state from before the retirement).

Common situations: Upgrading from an older version that supported `agy` CLI consent import; stale credential files on disk referencing the retired source.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/7d8a7683723aab0b. Report an issue: GitHub.

Appendix: source

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

        path.to_path_buf(),
    )
    .read_grant(consent_provider, source, path)?;
    match source {
        codewhale_config::ExternalCredentialSource::CodexCli => {
            crate::oauth::get_credentials(&grant).map(|_| ())
        }
        codewhale_config::ExternalCredentialSource::GrokCli => {
            crate::oauth::validate_grok_external_credentials(&grant)
        }
        codewhale_config::ExternalCredentialSource::DshCli => {
            crate::dsh_credentials::deepseek_api_key_from_grant(&grant)?
                .map(|_| ())
                .context("the DeepSeek Harness credentials file holds no DEEPSEEK_API_KEY")
        }
        // Retired: the reader is gone, so a legacy consent record validates
        // to nothing rather than resolving a route (PRD §4.4 PROD-002).
        codewhale_config::ExternalCredentialSource::AgyCli => {
            anyhow::bail!(codewhale_config::LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE)
        }
        codewhale_config::ExternalCredentialSource::KimiCodeCli => anyhow::bail!(
            "Kimi CLI credentials are never imported; configure a Kimi API key instead"
        ),
    }
}

/// Persist an explicitly confirmed read-only external credential grant and
/// update the live mirror only after the comment-preserving disk mutation
/// succeeds.
///
/// Order is load-bearing (#5772): the caller has already shown the
/// confirmation disclosure, this function then reads and validates the exact
/// consented file, and only a usable credential is allowed to produce a
/// persisted consent record.
pub(crate) fn persist_external_credential_consent_for_at(
    config_path: Option<&Path>,
    live_config: &mut Config,

View on GitHub (pinned to 433685b202)