ChatGPT’s “generated files” live in the temporary Code Interpreter / Advanced Data Analysis sandbox. The sandbox is created per conversation with a TTL — typically minutes to about an hour. After TTL expiry, page refresh, switching conversations, or quota exhaustion, the file is no longer downloadable. The download link looks like a permanent URL but actually points into that ephemeral sandbox. Once you understand this, most download failures diagnose themselves.
Common causes
Ordered by hit rate, highest first.
1. Sandbox session expired, link invalid
The most common failure. The file was generated, you waited 30 minutes, clicked download — sandbox already reaped. Link 404s / shows “file not found.”
How to spot it: Click within 5 seconds of generation = works; click 10-30 minutes later = fails → TTL expired.
2. Page refreshed after generation, sandbox cleared
Refresh triggers a sandbox rebuild. Files generated in the old sandbox don’t carry over; old links break.
How to spot it: Download worked right after generation → refresh → same link fails = sandbox was rebuilt.
3. The file was never actually generated (hallucinated link)
The model can “pretend” to give you a download link without actually invoking Code Interpreter. Link looks normal, 404s on click.
How to spot it: No grey python code block in the reply, no “Analyzed” indicator = Code Interpreter never ran. Ask it to “regenerate using the analysis tool” and compare.
4. Plan-level generation / download quota hit
Free tier Code Interpreter has tight quotas (per day / per 3 hours). When quota runs out the model may still “pretend” to generate, but the actual download is empty.
How to spot it: Worked earlier in the same session, now fails + model recently said “I can’t run analysis right now” = quota hit.
5. Browser security policy / extension blocking
Brave strict mode, ad blockers, enterprise proxies can block download links (especially non-openai.com CDN URLs).
How to spot it: Works in incognito / with ad blocker disabled = browser problem; fails in any browser = sandbox problem.
6. File too large or MIME type blocked by browser
Some large binaries / rare MIME types get silently dropped by the browser (“file may be dangerous”).
How to spot it: Download progress hits 100% but file isn’t in Downloads / is 0 bytes = browser blocked it. Check Chrome’s downloads history for “Failed - blocked.”
7. App vs Web routing differs
iOS / macOS apps sometimes handle download internally instead of via browser, saving directly to Files / Downloads — but report “can’t download” when the sandbox expires. The same link in Safari / Chrome might still work.
How to spot it: App download fails → copy the link to Safari / Chrome and retry = client routing difference.
Before you start
- Confirm whether this happens in a plain chat, a Project, or a Custom GPT — Code Interpreter quotas differ.
- Duplicate / screenshot the message that contains the download link before retesting — the link structure helps diagnose.
- Confirm your plan: Free / Plus / Team / Enterprise differ in Code Interpreter quotas and per-file size caps.
Info to collect
- Generated file type + approximate size (KB / MB).
- Elapsed time between generation and click-to-download.
- Browser + OS, whether you have ad blockers / privacy extensions.
- Exact failure mode: 404 / 0-byte / spinner forever / “file is no longer available.”
- Current model + subscription tier.
Shortest fix path
Ordered by ROI. The first two solve ~80% of cases.
Step 1: Download the file the instant it appears
The single most important habit. When you see the link / “Download” button:
- Click immediately (don’t peek at the content first).
- Stay in the same conversation, do not refresh.
- Save locally and confirm the file opens before continuing.
If you need to preview content first, ask the model to print inline as well:
Generate the file and also paste the first 30 lines inline so I can
sanity-check before downloading.
Step 2: If it failed, ask for regeneration
Don’t try to repair the link — get a new one:
That download link returned 404 (sandbox expired). Please regenerate
the file as a new download in this conversation.
Note that the model can introduce stochasticity — for deterministic output, pin all parameters in the prompt (seed, column order, grouping rules).
Step 3: For large files, switch to inline output
For text-shaped content (CSV / JSON / Markdown / code), skip the file entirely and have it inline:
Don't write to a file. Output the full content as a fenced markdown
code block. I'll copy it manually.
Sidesteps sandbox TTL completely. Fine for < tens of thousands of rows.
Step 4: Verify Code Interpreter actually ran
Avoid the “hallucinated link” failure mode:
Use the analysis tool. Generate the file. After generating, print:
1. The full path of the generated file
2. The output of `os.path.getsize(path)`
3. The first 10 lines of the file
All three printed = actually generated; only a link with none of these = model may be fabricating.
Step 5: Switch browser / disable extensions
If Chrome fails:
- Try Brave / Firefox.
- Disable ad blockers / privacy extensions.
- Use incognito (extensions disabled by default).
- Check Chrome’s downloads history for “blocked.”
If it still fails, treat it as sandbox expiry.
Step 6: Download via curl as a fallback
Copy the download URL and pull locally:
# Grab your cookie from DevTools → Application → Cookies
curl -L "https://files.oaiusercontent.com/..." \
-H "Cookie: __Secure-next-auth.session-token=YOUR_COOKIE" \
-o output.csv
Bypasses browser extension / routing problems. Doesn’t bypass sandbox expiry.
How to confirm the fix
- Open a fresh chat, regenerate the same task, download, open, content correct = truly fixed.
- Ask ChatGPT to paste the generation code; running it locally should reproduce = it’s not a transient issue.
- Have a colleague run the same prompt in their account and download = it’s not just your session that got lucky.
If still broken
- Cut the task to the minimum: ask it to generate a 10-line hello-world file and see if download works.
- Try different file types: CSV, TXT, PDF — rule out a per-type render / download path issue.
- Switch model + device: 4o → o3, Web → App, Chrome → Safari combinations.
- Package prompt + generation screenshot + failure symptom + subscription tier, file a ticket at help.openai.com.
Prevention
- Download files the instant they appear — never “let me check a few more messages first.”
- For long tasks where it’s possible, prefer inline output — sidesteps sandbox TTL entirely.
- For large datasets, pin
random_state/sort_orderin the prompt so regenerations stay consistent. - Output both the code (inline) and the file — even if the file expires, you can re-run locally.
- Always open the downloaded file before closing the conversation; don’t discover 0-byte hours later.
Related reading
- ChatGPT file upload failed
- ChatGPT file type unsupported
- ChatGPT misreads your CSV / Excel data file
- ChatGPT Projects
- ChatGPT file analysis
- ChatGPT Projects advanced workflow
Tags: #ChatGPT #ChatGPT files #Troubleshooting #Debug #Download