Cursor error
Cursor: <filename> is too large (4MB limit)
<filename> is too large (4MB limit)Status: By designLast verified 4 documented fixes2 sources
What it means
A file attached to a Cloud Agent at cursor.com/agents exceeds the web attachment limit. Documents and images have a 4 MB per-file limit; videos have a separate 15 MB per-file limit. The browser rejects the file before upload.
Causes
- The document or image is larger than 4 MB (or a video is larger than 15 MB).
- Changing the model's context window or enabling Max Mode does not raise the attachment limit.
- ZIP files are not supported as web document attachments.
How to fix it
- Fix 1.
Keep only the content the agent needs, or split the file into parts of 4 MB or less.
- Fix 2.
For logs and structured text such as JSON, CSV, XML, or HAR, keep the relevant time range and requests instead of the full capture.
- Fix 3.
Start the Cloud Agent from Cursor desktop and attach the file there, since attachment limits can differ from the web app.
- Fix 4.
For non-sensitive files already in source control, ask the agent to read them from its checked-out repository.
More Cursor errors
All 18 Cursor errorsAgent Execution Timed OutStatus: WorkaroundTimeout waiting for EverythingProviderStatus: WorkaroundCursor is damagedStatus: Workaroundsuspicious activityStatus: Workaroundxcrun: error: unable to find utility "mcpbridge"Status: Workaroundmissing tabIdentifierStatus: WorkaroundPrivate worker limit exceededStatus: By design{"error": "Too Many Requests", "message": "Rate limit exceeded. Please try again later."}Status: By design
Related reading
- Do Your Agent Hooks Fail Open? Claude Code vs Codex vs Cursor vs Gemini CLIA guard hook that crashes, times out or points at a missing script lets the tool call through by default in Claude Code. v2.1.295 adds onFailure: block. Here is what each coding agent does when your policy hook breaks, with real test runs.
- How to Keep API Keys Away From Your AI Coding Agent: Claude Code vs Codex vs Cursor vs Gemini CLIA deny rule on .env stops cat but not a Python one-liner. Here are the three layers that actually keep secrets out of a coding agent's context - file rules, environment scrubbing and credential masking - and what Claude Code, Codex, Cursor and Gemini CLI give you for each, with real test runs.
- Cursor Removes Dollar Costs From Usage Page: Tokens OnlyCursor removed dollar costs from its Usage page on July 31: self-serve plans see tokens only and the dashboard API zeroes cost fields, history included.
- AI Coding Agent Security Models Compared 2026: Permissions, Sandboxing, and Threat Models for Every Major ToolAI coding agent security models compared: how Claude Code, Cursor, Codex, Copilot, Aider and Windsurf handle permissions, sandboxing and prompt injection.
- HalluSquatting Makes AI Coding Agents a Supply-Chain ProblemHalluSquatting uses hallucinated repo and skill names to deliver promptware to AI coding agents. How the attack works and the harness controls that stop it.
- Securing AI Coding Agents: A Practical Threat Model for 2026Securing AI coding agents: a practical threat model for prompt injection, sandbox escapes, and hallucinated dependencies, with defenses ranked by effort.
FAQ
What does "<filename> is too large (4MB limit)" mean in Cursor?
A file attached to a Cloud Agent at cursor.com/agents exceeds the web attachment limit. Documents and images have a 4 MB per-file limit; videos have a separate 15 MB per-file limit. The browser rejects the file before upload.
How do I fix "<filename> is too large (4MB limit)"?
There are 4 documented fixes. Start with the first: Keep only the content the agent needs, or split the file into parts of 4 MB or less.
Is this Cursor error fixed?
Status: By design. Expected behavior, not a bug. The documented fixes change the setup that triggers it.
Sources
Last verified against 2 sources: official docs, maintainer replies and release notes.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.