Skip to content

[BUG]: Deploy zip file count doesn't match the server's: folder entries count toward the 10,000 limit ("Too many files in zip" below 10,000 files) #3655

Closed
forcedotcom/source-deploy-retrieve
#1844

Description

@yazanhoushieh

Before You Submit

  • I'm using the latest version of Salesforce CLI
  • I've searched the existing issues
  • I've run sf doctor to diagnose common issues

Related Issue

No response

Command

sf project deploy start

Org Type

Production

Did this work before?

No, this is a new bug

Last Working Version

No response

Summary

Salesforce's server counts every entry in the zip toward the 10,000 limit, files and folders both. It decides whether the deploy is accepted.
The CLI counts files only, and its warning uses that number. So the warning, and any component count, will always read lower than what the server enforces.

Repository to Reproduce

No response

Steps to reproduce

Scenario A – warning shown, deploy still fails
Repo: 4,000 Apex classes (each .cls + .cls-meta.xml, all in classes/) and 700 LWC bundles (each its own folder with .js + .js-meta.xml).

  • Deploy it → 9,401 files + 702 folder entries = 10,103 entries → ❌ Too many files in zip. Warning: count 9401 > 8000.
  • With 600 LWC instead → 9,201 files + 602 folder entries = 9,803 entries → ✅ passes. Warning: count 9201 > 8000.

Scenario B – no warning, deploy still fails
Repo: 3,400 LWC bundles (each its own folder with .js + .js-meta.xml), nothing else.

  • Deploy it → 6,801 files + 3,401 folder entries = 10,202 entries → ❌ Too many files in zip. No warning.
  • With 3,300 LWC instead → 6,601 files + 3,301 folder entries = 9,902 entries → ✅ passes.

Expected Result

The CLI warning to be more accurate and count folders.

Actual Result

Count done by the tool is less than the actual count done by the server.

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.151.7",
  "nodeVersion": "node-v24.20.0",
  "osVersion": "Darwin 25.5.0",
  "rootPath": "/Users/yazanhoushieh/.local/share/sf/client/2.151.7-3910271",
  "shell": "zsh",
  "pluginVersions": [
    "@mms/deployment-wizard 2.3.6 (link) /usr/local/lib/node_modules/@mms/deployment-wizard",
    "@oclif/plugin-autocomplete 4.0.0 (core)",
    "@oclif/plugin-commands 5.0.0 (core)",
    "@oclif/plugin-help 7.0.0 (core)",
    "@oclif/plugin-not-found 4.0.0 (core)",
    "@oclif/plugin-plugins 6.0.0 (core)",
    "@oclif/plugin-search 2.0.0 (core)",
    "@oclif/plugin-update 5.0.0 (core)",
    "@oclif/plugin-version 3.0.0 (core)",
    "@oclif/plugin-warn-if-update-available 4.0.0 (core)",
    "@oclif/plugin-which 4.0.0 (core)",
    "@salesforce/cli 2.151.7 (core)",
    "agent 2.0.5 (core)",
    "apex 4.1.1 (core)",
    "api 2.0.9 (core)",
    "auth 5.0.6 (core)",
    "code-analyzer 5.16.0 (user) published 34 days ago (Wed Aug 26 2026)",
    "community 4.0.6 (user) published 27 days ago (Wed Sep 02 2026)",
    "data 5.1.7 (core)",
    "deploy-retrieve 4.2.0 (core)",
    "info 4.0.9 (core)",
    "limits 4.0.4 (core)",
    "marketplace 2.0.5 (core)",
    "org 6.0.11 (core)",
    "packaging 3.0.7 (user) published 27 days ago (Wed Sep 02 2026)",
    "schema 4.0.6 (core)",
    "settings 3.0.6 (core)",
    "signups 3.0.6 (user) published 27 days ago (Wed Sep 02 2026)",
    "sobject 2.0.5 (core)",
    "telemetry 4.0.6 (core)",
    "templates 57.1.0 (core)",
    "trust 4.0.10 (core)",
    "user 5.0.2 (core)",
    "@salesforce/sfdx-scanner 4.12.0 (user) published 517 days ago (Tue Apr 29 2025)",
    "sfdmu 5.8.0 (user) published 87 days ago (Fri Jul 03 2026)",
    "sfdmu-ptm 1.3.1 (link) /Users/yazanhoushieh/Documents/projects/sachsenEnergieAG/produkt-sfdmu-wrapper",
    "sfdx-browserforce-plugin 6.4.0 (user) published 27 days ago (Tue Sep 01 2026)",
    "sfdx-git-delta 6.45.1 (user) published 95 days ago (Fri Jun 26 2026)",
    "sfdx-hardis 8.12.0 (user) published 0 days ago (Tue Sep 29 2026)"
  ]
}

Additional Information

No response

Screenshots or Log Files

No response

Activity

  1. changed the title [-][BUG]:[/-] [+][BUG]: Deploy zip file count doesn't match the server's: folder entries count toward the 10,000 limit ("Too many files in zip" below 10,000 files)[/+] on Sep 29, 2026
  2. github-actions commented on Sep 29, 2026

    @github-actions

    Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

  3. WillieRuemmele commented on Sep 29, 2026

    @WillieRuemmele
    Member

    HI @yazanhoushieh - thanks for reporting this! we'll get them counting correctly

  4. added
    bugIssue or pull request that identifies or fixes a bug
    and removed
    investigatingWe're actively investigating this issue
    on Sep 29, 2026
  5. git2gus commented on Sep 29, 2026

    @git2gus

    This issue has been linked to a new work item: W-24345651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue or pull request that identifies or fixes a bugvalidatedVersion information for this issue has been validated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions