My Agent Can't Handle Large Files — What's the Workaround?
Last updated: June 16, 2026
Gumloop agents accept any file type, up to 200 MB per attachment. If a file is larger than the AI model can read directly (for example, an image over 5 MB or a PDF over 100 pages), the agent automatically makes it available in its built-in code sandbox and works with it there — you usually don't need to do anything. The only case that needs a workaround is a file larger than 200 MB: instead of attaching it directly, pull it in through a Drive integration.
Symptoms
You attach a file to the agent chat and see
File exceeds 200MB limitThe agent says
The provided image exceeds the 5 MB size limit. Please reduce the file size or switch AI models and try again!for an imageA PDF is rejected with
PDF exceeds this provider's 100-page limit.orPDF is password-protected or encrypted.You want to work with a file that's too large to upload from your browser, or that already lives in cloud storage
What Are the Actual Limits?
Context | Limit | Notes |
Agent chat attachment (any file type) | 200 MB per file | The only hard cap, enforced at upload. Files over 200 MB are blocked with |
Image read directly by the AI model | 5 MB (Anthropic) / 20 MB (Gemini) | Set by the model provider. Larger images are routed to the sandbox automatically |
PDF read directly by the AI model | 32 MB and 100 pages (Anthropic) / 50 MB (Gemini) | Password-protected or encrypted PDFs aren't supported |
Agent code sandbox workspace | 200 MB total, 200 MB per file | Where larger or model-unsupported files are made available for the agent to process |
How Agents Handle Large Files
Agent chats accept any file type — documents, spreadsheets, images, PDFs, audio, video, archives — up to 200 MB per file. That 200 MB cap is the only hard limit enforced at upload.
The per-model limits (images and PDFs) are set by the AI provider, not Gumloop — the agent can't send the model more data than the provider accepts. When a file is larger than the model can read directly, or is a type the model can't inspect inline (such as video), the agent doesn't skip it: it automatically routes the file to its code sandbox, where it can open, chunk, compress, or convert it using pre-installed libraries. In most cases this happens automatically and you don't need to take any action.
Limits also differ by model, so switching the agent to a provider with higher limits (for example, Gemini for larger images or PDFs) can let the model read a file directly that another provider would route to the sandbox.
Workaround: For files over 200 MB, pull them in from Drive
If a file is too large to upload as a direct attachment (over the 200 MB limit), don't attach it to the chat. Instead, store it in Google Drive and have the agent pull it in through its Drive integration, then process it in the sandbox. This also works well for files that already live in cloud storage or are awkward to upload from your browser.
Add the Google Drive integration to your agent if it doesn't already have one. See How to give your agent access to a tool or integration.
Make sure the file is in Google Drive (upload it there if it isn't already).
Tell the agent which file to pull and what to do with it. The agent fetches the file through its Drive tool and works with it directly in the sandbox.
Example prompts:
"Pull 'annual-report.pdf' from my Google Drive and summarize the key findings by section."
"Grab 'sales-export.csv' from my Drive 'Exports' folder, then in the sandbox filter to rows where Status = Active and total the revenue by region."
"Find 'customer-photos.zip' in my Google Drive, unzip it in the sandbox, and tell me how many images it contains and their dimensions."
Validation
After pulling the file from Drive, confirm that:
The agent confirms it found and downloaded the file from Drive
You see output from the sandbox code execution (for files processed there)
The agent's response references actual content from the file, confirming it was read
Still Need Help?
If this didn't resolve your issue, reach out to support at support@gumloop.com.