FileGen PDF

"Code interpreter session expired": how to get your file

ChatGPT made you a PDF, a spreadsheet or an image. You clicked the download link and got Code interpreter session expired instead. The file was real, but it lived in a temporary workspace that has now been cleared. The good news: the content that went into the file is usually still in your chat.

What the message means

When ChatGPT creates a file, it runs Python in a short-lived sandbox (the "code interpreter", also called data analysis). The file is saved inside that sandbox, in a folder like /mnt/data. The download link points there.

The sandbox does not stay open forever. OpenAI's developer documentation says a code interpreter container expires after 20 minutes without use, and that its data is discarded and cannot be recovered. ChatGPT itself does not publish its exact timeout, but users report the same pattern: the link works right away and fails later.

Why it happens even when you were quick

How to fix it

Fix 1: Make the PDF yourself (works every time)

  1. In the same chat, reply: Paste the full content of that file here as Markdown.
  2. Copy the answer.
  3. Paste it into the free PDF generator and click Download PDF.

Headings, lists, tables and code blocks are kept. The PDF is made in your browser, so there is no link that can expire.

Fix 2: Ask ChatGPT to create the file again

Reply: The session expired. Please recreate the file and give me a new download link. Then download it right away. Some users on the OpenAI forum say this worked for them; others needed a new chat (Fix 3). If it asks you to upload your original file again, do that: uploads are lost with the sandbox too.

Fix 3: Start a fresh chat for big files

If the error keeps coming back in one conversation, ask for a short summary of what you need, open a new chat, paste the summary, and ask for the file there. A new chat gets a new sandbox.

Fix 4: Try another device or the browser

Open the same conversation in a desktop browser or the mobile app and click the newest link there.

How to avoid it next time

Related errors

Questions

Can I recover the expired file?

Not from the old link. The sandbox data is deleted. You need ChatGPT to create it again, or rebuild it from the text in the chat.

Is my chat or my account broken?

No. The error is about the temporary workspace only. Your conversation and account are fine.

Does a paid plan stop this?

Paid plans can create files, but the sandbox is still temporary. Download right away, or keep the content as text.

Sources: OpenAI developer docs, Code Interpreter (container expiry). OpenAI Developer Community threads #793962 and #1286049. Google autocomplete lists "code interpreter session expired chatgpt download" and "when downloading file" (checked November 4, 2026). Last updated November 4, 2026. FileGen PDF is independent and not affiliated with OpenAI, Anthropic, Google or any AI provider.