Sandbox and coding agent
The small machine where the assistant runs code, and the coding agents that build in it.
A sandbox is a small machine of its own for one chat, one flow run, or one Studio project. The assistant runs code there, writes files, and builds apps. It is cut off from your computer and from other people's sandboxes, and it ends after it sits unused. A coding agent is a specialist that does larger building work inside the sandbox.
What the assistant can do in a sandbox
- Run code in Python, JavaScript, TypeScript, or Bash.
- Run commands.
- Read, write, and list files in the project folder.
- Build a web app and open a preview of it.
- Share a file it made back to the chat, or copy one of your files in.
Work that stays inside the sandbox runs without an approval card, even in restricted mode. Wiping the sandbox and copying a file in still ask. See Approval modes.
Files
Choose Files in the chat's header to browse the sandbox's folder and read its text files. From there you can:
- Build and preview: see how the project would be built, change the commands if needed, and open it;
- Download: the folder packed as one file.
Previews
A preview opens the app the sandbox serves in a pane beside the chat, on an address of its own that only you can open. View it at phone, tablet, and desktop widths, reload it, or open it in a tab. A preview lasts a while and can be renewed or closed from its card. The assistant can also look at a preview and read its errors.
When the sandbox ends
A chat's sandbox ends after it sits unused. Its folder is kept as a file of the chat, so Files can still download it. A flow run's sandbox ends with the run. Deleting a chat ends its sandbox at once.
If a sandbox stops because it ran out of memory, a new one is made on the same files and you are told.
The coding agent
The coding agent builds larger things: an app, a feature, a fix across many files. The supported agents are Claude Code, Codex, OpenCode, and Grok Build. Each runs on your own model key from one of its providers. Choose one in Settings → Features → Coding agent, or leave it on auto to use the first one your keys run.
Its card in the chat shows its progress live, with Stop. When it ends, it shows the report, the files changed, the time, and the cost. If it made a web app, the app is opened as a preview.
Free runs
If you have no key that runs an agent, your plan may include a number of free runs a month on the built-in models. The card says "Free run", and the Coding agent card in Settings shows what is left.
Reply and continue
Reply to an agent from its card to go on in the same session. If it ran out of time, was interrupted, or changed nothing, its card offers Continue.
Settings
| Setting | What it does |
|---|---|
| Coding agent | Which agent runs. |
| Give it my skills | Hands it your skills. |
| Let it use my tools | Off, read only, or all. With all, its actions still follow your approval mode. You can also limit which connected services it reaches. |
Limits
Your plan sets how many sandboxes you may have at once, their memory, and the coding agent's minutes. At the limit, the chat sandbox unused longest may be ended to make room, with its folder kept.