Quick answer
Gemini documents code folder or repository upload as Up to 5,000 files and 100 MB. One code folder or GitHub repository can be added to a chat within these ceilings.
Verified Aug 22, 2026Official source
Current limits
| Constraint | Current value | Scope | Verified source |
|---|---|---|---|
| code folder or repository uploadOne code folder or GitHub repository can be added to a chat within these ceilings. | Up to 5,000 files and 100 MB | Gemini Apps | GoogleAug 22, 2026 |
Why does this limit matter?
Generated files, vendored dependencies, and build artifacts can consume the file count without adding useful context.
This value is scoped to Gemini Apps; a different plan, runtime, model, endpoint, region, or account can produce a different effective constraint.
What should you check?
- Exclude dependencies and generated artifacts, then verify file count and packed size before attaching.
- Confirm the exact plan, model, runtime, endpoint, region, and account that serve the failing workload.
- Record the observed value, response headers or configuration, timestamp, and source without logging secrets.
Important caveats
- The active context window can still be smaller than the readable content represented by the repository bytes.
- Treat the official source and live account configuration as authoritative if they differ from this verified snapshot.
HyperObserve reports the documented platform constraint. Your application, SDK, gateway, provider, region, or account can impose a lower effective limit.
Related