
The code interpreter session expired message means ChatGPT’s temporary code-running workspace is no longer available for that conversation. In most cases, you fix it by reloading ChatGPT, reuploading the original file, asking ChatGPT to rerun the analysis, or starting a new chat with the same prompt and data. OpenAI now describes Code Interpreter under ChatGPT’s Data Analysis and Advanced Data Analysis features, and its code execution environment is tied to the conversation rather than a permanent workspace.[1] If the error appears during a broader upload problem, check OpenAI status before rebuilding your work.
What the error means
The code interpreter session expired error appears when the temporary code execution environment behind a ChatGPT analysis task is no longer usable. That environment is where ChatGPT reads uploaded files, writes Python code, runs calculations, generates charts, and creates downloadable artifacts. OpenAI says ChatGPT creates a new code execution environment the first time it analyzes data in a conversation, and that environment is accessible only from the associated conversation.[1]
The important word is temporary. OpenAI says the instance is destroyed within 13 hours after the conversation becomes inactive, and a localized OpenAI Help Center version repeats the same 13-hour inactivity window.[1][2] After that, ChatGPT may still remember the text of the conversation, but the live workspace that contained imported files, variables, temporary paths, generated charts, and working code may be gone.
This error is not always the same as a normal ChatGPT outage. It can happen even when ChatGPT loads fine. It can also happen after you leave a tab open overnight, switch devices, return to an old analysis thread, or try to download a file that was generated by an earlier session. If your problem is only with uploads, use our chatgpt file upload not working guide alongside this one.

Quick fix checklist
Start with the lowest-effort fixes. Stop when the file opens, the code runs, or the chart regenerates.
- Copy your last prompt. Save the exact instruction before refreshing the page.
- Reload ChatGPT. A stale browser tab can keep showing an old session state.
- Ask ChatGPT to rerun the analysis. Use a direct prompt: “The code interpreter session expired. Recreate the analysis from the uploaded file and rerun the code.”
- Reupload the source file. If ChatGPT says it can no longer access the file, upload the original CSV, spreadsheet, PDF, or document again.
- Start a new chat. Paste the saved prompt, upload the file, and ask for the same output.
- Try another browser or the mobile app. This helps isolate a browser cache, extension, cookie, or app state issue. If the app itself fails, check our ChatGPT app not working troubleshooting steps.
- Check OpenAI status. Upload and file-processing incidents can produce errors that look like local session problems.
Do not keep clicking the same expired download link. A generated file link can point to an artifact from a dead code environment. Ask ChatGPT to regenerate the file instead. If the whole conversation fails to load, the issue may be closer to chatgpt conversation not found error, not Code Interpreter itself.

Decide whether it is your session, your file, or OpenAI
The fastest fix depends on which layer failed. Use this table before you rebuild the whole analysis.
| Symptom | Most likely cause | Best next step |
|---|---|---|
| Old chart, file, or download link no longer opens | The code execution session expired | Ask ChatGPT to regenerate the output from the original data |
| ChatGPT says it cannot access the uploaded file | The file is no longer attached to the active analysis environment | Reupload the file and rerun the prompt |
| New uploads fail across several chats | Upload service issue or account quota problem | Check status, then review file limits and storage caps |
| Every message fails, even without files | General ChatGPT service or network issue | Try a different connection and see chatgpt network error |
| You see server-side errors instead of session wording | Backend error unrelated to the analysis workspace | Compare with chatgpt internal server error or chatgpt something went wrong error |
| You see repeated request or rate warnings | Rate limiting or temporary overuse | Pause, then check ChatGPT Error 429 Too Many Requests |
File size can also matter. OpenAI’s file upload FAQ lists a 512 MB hard limit for files uploaded to a GPT or ChatGPT conversation, and OpenAI’s GPT Builder documentation also lists 512 MB for uploaded knowledge files.[3][4] The same OpenAI file upload FAQ lists a 2M-token cap for text and document files, an approximate 50 MB limit for CSV files or spreadsheets depending on row size, a 20 MB limit for images, and an upload rate of up to 80 files every 3 hours for eligible users.[3]
If a file is near those limits, treat the session-expired message as a recovery problem and a file-preparation problem. Split large spreadsheets, remove unnecessary columns, export only the sheet you need, or compress images before trying again. If ChatGPT asks you to sign in again, solve that first with our chatgpt login failed guide.

Step-by-step recovery for data analysis work
Use this recovery sequence when you were working with a spreadsheet, CSV, JSON file, PDF, generated chart, ZIP file, or downloaded report.
1. Preserve the instructions before refreshing
Copy the prompt that produced the analysis. Also copy any follow-up requirements, such as chart colors, filters, grouping logic, regression settings, date ranges, or output format. If ChatGPT wrote visible code, copy that too. OpenAI says ChatGPT writes Python code, executes it, examines the results, and integrates the results into the chat response when analyzing data.[1] That code can be enough to recreate the work in a fresh session.
2. Ask for a clean rerun
Do not ask, “Can you fix it?” Use an explicit instruction:
The code interpreter session expired. Recreate the analysis from scratch using the attached file. Restate the assumptions, rerun the code, regenerate the chart, and create a fresh download link.
This wording tells ChatGPT not to rely on stale paths or old variables. It also gives you a fresh explanation that can reveal whether the regenerated result differs from the original.
3. Reupload the original file
If ChatGPT says it no longer has access to the file, upload the source file again. Use the original file, not a screenshot of the result. For spreadsheets, prefer CSV or XLSX with one table per sheet, clear column headers, and no blank header rows. OpenAI recommends structured data that ChatGPT can inspect for schema and value types before analysis.[1]
4. Start a new chat when the old one keeps failing
A long conversation can contain stale references to expired files and generated artifacts. Start a new chat when reruns keep failing in the same thread. Paste a short project brief, upload the file, then ask ChatGPT to recreate the previous result. If your main blocker is slowness rather than expiration, compare symptoms with why is my ChatGPT so slow.
5. Regenerate downloads instead of reopening old links
Generated files are the easiest artifacts to lose after a session expires. Ask ChatGPT to create a new CSV, XLSX, PNG, PDF, or ZIP from the current analysis. Then download it immediately and store it locally. If the browser shows a network interruption during the download, solve that as a network problem rather than an analysis problem.
Prevent it during long projects
You cannot make ChatGPT’s code execution environment permanent. You can make your work easy to restart.
- Keep source files outside ChatGPT. Store the original dataset in a project folder, not only in the chat.
- Ask for reproducible code. When the result matters, ask ChatGPT to show the Python code or provide a notebook-style script.
- Save intermediate outputs. Download cleaned data, charts, and final reports as soon as they are generated.
- Name files clearly. Use names like
sales_q4_cleaned.csvrather thanfinal2.csv. - Work in smaller chunks. Split long analysis tasks into import, cleaning, modeling, visualization, and export steps.
- Summarize the state before stopping. Ask ChatGPT to write a restart note that lists the files used, transformations applied, and next steps.

A good restart note is short but specific. Ask for something like this:
Create a restart note for this analysis. Include the file names, columns used, filters applied, formulas or code decisions, generated outputs, and the next prompt I should use if the session expires.
This habit is especially useful when you work near file limits or message limits. If you keep hitting broader usage ceilings, see chatgpt daily limit and How to Bypass ChatGPT Message Limits Legitimately.

When to wait or contact support
Wait if multiple new uploads fail, if file processing stalls before ChatGPT can inspect the file, or if other users in your workspace see the same problem. OpenAI’s status history shows that file-upload incidents can affect ChatGPT independently from the rest of the product. On March 2, 2026, OpenAI reported elevated errors affecting file uploads and file processing, then marked the incident resolved later that day.[5]
There is also a closer match to the wording users often report. In a November 14, 2025 status incident, OpenAI said file uploads to ChatGPT conversations were failing for some users with an error message indicating that the file had expired.[6] That history matters because a “session expired” or “file expired” message is not always caused by something you did locally.
OpenAI’s file upload FAQ tells users troubleshooting upload limit problems to check status.openai.com for incidents that may affect uploads, and to escalate with the account email, screenshot, timestamp and timezone, platform or browser, and request ID if available.[3] Include the exact wording of the error and whether it happens in one chat, all chats, one browser, or every device.
If OpenAI status is clean and only your connection fails, try disabling a VPN, proxy, privacy extension, or corporate firewall temporarily. Our chatgpt not working with vpn guide covers that path. If a status incident is active, repeated refreshes rarely help. Save your prompt, wait for recovery, and rerun the analysis after uploads and file processing return to normal. For broader service context, follow ChatGPT Outage History and chatgpt outages 2026.
Frequently asked questions
Does “code interpreter session expired” mean my chat is gone?
Usually no. The chat transcript may still exist, but the temporary code execution environment behind the analysis may be gone. Reupload the source file and ask ChatGPT to rerun the work from scratch.
Can ChatGPT recover files from an expired Code Interpreter session?
Do not assume it can. If the generated file or temporary workspace is expired, the reliable fix is to regenerate the file from the original source data. Save important downloads locally as soon as ChatGPT creates them.
Why does this happen after I leave ChatGPT open overnight?
The code-running workspace is temporary and tied to activity in the conversation. OpenAI says the environment is destroyed within 13 hours after the conversation becomes inactive.[1] A browser tab can remain open even after the underlying execution session is no longer available.
Is Code Interpreter the same as Advanced Data Analysis?
In current OpenAI help material, the file and analysis workflow is described under Data Analysis and Advanced Data Analysis, with Code Interpreter referenced as the former or capability-level name in some contexts.[1][3] Users still often say “Code Interpreter” because that was the older product label.
Should I clear my browser cache?
Try reloading first. If the same chat keeps showing stale state, try a private window or another browser before clearing all site data. Cache fixes help browser-state problems, but they will not revive an expired code execution environment.
When should I start a new chat?
Start a new chat when reloading and rerunning fail in the original thread. Paste the original instructions, reupload the file, and ask ChatGPT to recreate the analysis. This removes stale references to old file paths and expired generated artifacts.
