BigPizzaV3/CodexPlusPlus · error · anyhow::Error

openai/plugins marketplace download is too large

Error message

openai/plugins marketplace download is too large: {} bytes

What it means

download_openai_plugins_zip fetches the openai/plugins marketplace archive over HTTP and enforces a hard size ceiling (OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES). If the downloaded body exceeds that limit it aborts with this error instead of unzipping an oversized archive, protecting memory and disk from an unexpectedly huge or malicious download.

Solutions

  1. Check OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES in plugin_marketplace.rs and raise it to accommodate the current openai/plugins archive size
  2. Verify what is actually served at the download URL (curl -sI) — confirm it is the expected zip and not a bloated mirror artifact
  3. Update CodexPlusPlus to a version with an up-to-date limit constant
  4. If the URL is a proxy, bypass it or point directly at the canonical GitHub archive

Example fix

// before
if bytes.len() > OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES {
    anyhow::bail!("openai/plugins marketplace download is too large: {} bytes", bytes.len());
}
// after
const OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES: u64 = 256 * 1024 * 1024; // raised from old limit
Defensive patterns

Strategy: validation

Validate before calling

let resp = reqwest::get(url).await?;
let bytes = resp.bytes().await?;
if bytes.len() > OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES {
    return Err(anyhow!("download too large: {} bytes", bytes.len()));
}

Try / catch

match download_openai_plugins_zip().await {
    Ok(bytes) => install(bytes),
    Err(e) if e.to_string().contains("too large") => warn_user_and_suggest_manual_download(e),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: initialize_openai_curated_marketplace_from_github calls download_openai_plugins_zip and the GitHub zip response body's byte length exceeds OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES — e.g. the upstream repo added many more plugins, a release includes large assets, or the limit constant is set too low for the current marketplace size.

Common situations: Upstream openai/plugins grew beyond the baked-in limit; a proxy/mirror returns an unexpected large file; operator pinned an old CodexPlusPlus version whose limit predates the marketplace's growth.

Understand the failure class

Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/38fba72f52dffd47. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/plugin_marketplace.rs:311

    install_openai_plugins_zip(home, &bytes)
}

async fn download_openai_plugins_zip() -> anyhow::Result<Vec<u8>> {
    let client =
        crate::http_client::proxied_client(&format!("Codex++/{}", crate::version::VERSION))?;
    let bytes = client
        .get(OPENAI_PLUGINS_ZIP_URL)
        .header(reqwest::header::ACCEPT, "application/zip")
        .send()
        .await
        .context("failed to download openai/plugins marketplace")?
        .error_for_status()
        .context("openai/plugins marketplace download returned an error status")?
        .bytes()
        .await
        .context("failed to read openai/plugins marketplace download body")?;
    if bytes.len() > OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES {
        anyhow::bail!(
            "openai/plugins marketplace download is too large: {} bytes",
            bytes.len()
        );
    }
    Ok(bytes.to_vec())
}

fn install_openai_plugins_zip(home: &Path, bytes: &[u8]) -> anyhow::Result<()> {
    let destination = home.join(".tmp").join("plugins");
    let staging_parent = home.join(".tmp");
    std::fs::create_dir_all(&staging_parent)
        .with_context(|| format!("failed to create {}", staging_parent.display()))?;
    let staging = staging_parent.join(format!(
        "plugins-download-{}",
        std::time::SystemTime::now()
            .duration_since(std::time::UNIX_EPOCH)
            .unwrap_or_default()
            .as_millis()

View on GitHub (pinned to b1ed92e5e4)