code interpreter
in English: code interpreter / code execution tool
A tool that allows AI not only to write code but also to run it in an isolated, secure environment and continue working based on the real output.
In plain terms
A language model by default only generates text. If it must multiply several large numbers or sum a table with thousands of rows, it works "from memory" and easily makes mistakes. A code interpreter is like giving a calculator and spreadsheet to a colleague who speaks well but is uncertain when calculating in their head: it does not guess, it calculates.
In practice, this is a small, isolated computer in the cloud that the AI can use. It writes a short program (mostly in Python), runs it, checks the result, and summarizes it for you. This enables it to analyze Excel spreadsheets, draw charts, convert files, or perform precise calculations.
It differs from a simple chatbot because a real operation is performed behind the response, not just text that sounds plausible. One of the most important tools for agents: this turns "talking" AI into "working" AI.
How it works
- You formulate the task, and if needed, upload a file (such as a spreadsheet or PDF).
- The model decides whether code execution is needed for the task and writes the required program.
- The code runs in a sandbox: this is an isolated, temporary environment that cannot access your own machine and has no or only limited access to the internet.
- The result of the run (numbers, error messages, completed file, or chart) is returned to the model. If an error occurred, it corrects the code and tries again.
- At the end, you receive a comprehensible answer, often with a downloadable file or graphic, and you can usually view the executed code as well.
An everyday example
You upload a one-year Excel sheet of family expenses to an AI assistant and ask where most of the money went. The assistant does not estimate: it writes a program, sums up the items by category, and draws a pie chart for it. It does all this without you seeing a single line of code if you do not want to.
Who is affected
A common misconception
Limits and risks
- The sandbox is temporary: files and partial results are usually lost at the end of the session, so download anything you wish to keep.
- Resources are limited: it often struggles with large files, long-running calculations, or custom software packages, and usually has no free internet access.
- Uploaded data is processed on the provider's server, so share personal or business secrets only after understanding the company's rules and data protection terms.
- If the processed file contains a hidden instruction, it may deceive the model, so be cautious with documents from unknown sources.
Similar, but not the same
- coding agent – A coding agent works on a full software project on the developer's machine or storage, while the code interpreter is only an isolated tool with which the model calculates subtasks.
- code generation – In code generation, the AI only writes the program, and you must run it; the code interpreter, however, runs it itself and sees the result.
- computer use – There, AI sees a screen and handles programs with a mouse and keyboard; here, it runs code directly, without a graphical interface.
Related concepts
tool use, AI-agent, function calling
data analyst assistant, programmed tool invocation
A brief history
The concept was widely popularized by OpenAI. It was announced in spring 2023 under the name Code Interpreter and made available to ChatGPT subscribers later that same year. In August 2023, it was renamed Advanced Data Analysis, and later the separate name disappeared as the capability was integrated into ChatGPT's core functions. Since then, major model providers, including Google and Anthropic, have offered their own code execution tools, typically under the name "code execution".
Where things stand
By the end of 2026, it is standard equipment in leading AI assistants and developer platforms: most users do not even notice when the assistant runs code in the background. Development is heading toward more durable runtime environments that coordinate multiple tools.
In the news
- Zero-click RCE vulnerability hits four major AI coding agents; two remain unpatchedSep 18, 2026 · Code
Also known as
code interpreter · code interpreter · code execution tool · code execution · code interpreter · code execution tool · Advanced Data Analysis · sandboxed code execution
Sources
- OpenAI Platform – Code Interpreter (developer documentation)
- Google AI for Developers – Code execution (Gemini API)
- Anthropic – Code execution tool (developer documentation)
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.