Code workspace troubleshooting
Fixes for timeouts, lost files, missing packages, and stalled downloads in the chat's code workspace.
Most code-workspace problems come down to three things: a step that ran longer than its time limit, a file written to a temporary folder that did not survive the session, or a package that is not preinstalled. This page covers the common failures, what Ivy does about them, and what you can ask for. For the workspace itself, see the code workspace.
Timeouts
Each run in the workspace has a time limit:
| What runs | Default | Maximum |
|---|---|---|
| A shell command or Python script | 30 s | 120 s |
| An R script | 60 s | 120 s |
| A Jupyter notebook | 120 s | 600 s |
If a step keeps hitting the ceiling, the usual causes are a very large input file or a computation that is genuinely long. Ask Ivy to check the file's size first, to work on a sample, or to move the long step into a compute job. A process that exits with 137 or 134 and no error text was usually killed for exceeding the workspace's ~4 GB of memory, and the fix is to stream or chunk the file instead of loading it whole. Repeated timeouts in one chat are detected automatically, and Ivy changes approach instead of spending the whole turn retrying a workspace that has stopped responding.
Lost files
The most common surprise is a file that was written successfully but is gone in a later message. Files that code writes are not kept automatically. Only results the platform writes under /workspace/files/downloads/ (compute-job outputs and other tool results) persist on their own, and that folder is read-only to code: a write or move into it fails with PermissionError [Errno 13].
Anything in /workspace/scratch/, /workspace/inbox/, /tmp/ or another path is lost when the session ends unless it is saved. To keep a file, ask Ivy to save it to your files. Ivy uploads it and it appears as a named file in the Files panel. A downloaded dataset can be saved from wherever it landed.
Missing packages
The workspace preinstalls a large scientific stack (see what comes preinstalled). Before assuming something is missing, ask Ivy to list the installed packages and command-line tools with their versions. If a package really is absent, Ivy can install it from PyPI for the current session. Installed packages do not carry over, so a new chat starts from the preinstalled set again.
Stalled or failed downloads
Ivy fetches public URLs into the workspace, and the size decides how:
- Under 50 MB: fetched directly.
- 50–500 MB: fetched in the background, because a direct fetch would time out.
- Over 500 MB, or of unknown size: Ivy checks the size first, then fetches in the background.
A background download returns immediately and Ivy checks its progress until it finishes. A "download failed" message should only appear once the download has actually reported an error, not because it was slow to start.
Workspace unavailable
If code cannot run at all, two causes are worth checking:
- Guest chats can start only a limited number of workspaces in a 10-minute window, and a limited number per day. Once a start is refused, the chat cannot run code for 10 minutes. See guest mode.
- Heartbeat failures. A workspace that misses several 60-second heartbeats in a row is marked dead, and a fresh one starts on the next run. A brief "workspace restarting" is normal. A persistent failure usually points to a platform-side issue.
Read next
Was this page helpful?