BigPizzaV3/CodexPlusPlus · error

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

Error message

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

What it means

download_openai_plugins_zip (crates/codex-plus-core/src/plugin_marketplace.rs:301) fetches OPENAI_PLUGINS_ZIP_URL and enforces a hard ceiling of OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES = 128 MiB (plugin_marketplace.rs:13) on the response body. Exceeding it bails with the byte count. The guard bounds memory and disk exposure when refreshing the bundled openai/plugins marketplace; hitting it means the payload at the URL grew beyond the budget or the URL returned unintended content.

Source

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

    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 1f431ae49b)

Solutions

  1. Verify what the URL actually returns: curl -sL -o /dev/null -w '%{size_download} %{content_type}' <url> — a size near or above 128 MiB with application/zip means upstream genuinely grew; anything else (HTML, octet-stream junk) means the URL or proxy is wrong
  2. Fix the fetch path: remove intercepting proxies for this host or correct a stale OPENAI_PLUGINS_ZIP_URL constant
  3. If the growth is legitimate, raise OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES in crates/codex-plus-core/src/plugin_marketplace.rs:13 with maintainer sign-off (it is a memory-safety budget) and adjust its tests
  4. Fall back to the embedded marketplace copy for this refresh, then retry later

Example fix

// before: constant pins the budget
const OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES: usize = 128 * 1024 * 1024;
if bytes.len() > OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES { /* bail */ }

// after (after verifying upstream growth is legitimate)
const OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES: usize = 256 * 1024 * 1024;
if bytes.len() > OPENAI_PLUGINS_DOWNLOAD_LIMIT_BYTES { /* bail */ }
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight the artifact size before committing to install
async fn artifact_within_budget(url: &str, limit: u64) -> Option<bool> {
    let resp = reqwest::get(url).await.ok()?;
    let len = resp.headers().get(reqwest::header::CONTENT_LENGTH)?
        .to_str().ok()?.parse::<u64>().ok()?;
    Some(len <= limit)
}

Try / catch

match download_openai_plugins_zip().await {
    Err(e) if e.to_string().contains("marketplace download is too large") => {
        tracing::warn!("marketplace artifact exceeded budget; keeping existing copy");
        keep_current_marketplace() // do not wipe installed plugins on oversized download
    }
    rest => rest?,
}

Prevention

When it happens

Trigger: Refreshing the plugin marketplace (the flow that calls download_openai_plugins_zip -> install_openai_plugins_zip) when the served zip exceeds 128 MiB — e.g. upstream dramatically expanded the bundle, the URL now serves an uncompressed or wrong artifact, or a MITM/proxy substitutes content.

Common situations: Upstream marketplace bundle growth across versions; corporate proxies serving error pages or repackaged content with huge bodies; a changed OPENAI_PLUGINS_ZIP_URL pointing at a debug/uncompressed artifact; extremely rare in normal operation since the real bundle is far under the cap.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@1f431ae49b (2026-08-16). Data as JSON: /api/errors/38fba72f52dffd47. Report an issue: GitHub.