Laziness
All docs
Troubleshooting

Coding agent and sandbox

Why a coding agent ended without its work, why a sandbox could not start, and what to do.

The coding agent works in your sandbox, and both can stop for reasons that have nothing to do with your request: a provider refusing a key, a machine running out of memory, or simply time running out. The agent's card, its line in the chat, Studio's agent bar, and the notice you get all give the same reason. This page explains each one.

Before it can start

These come up when a sandbox has nowhere to run. In a chat the assistant tells you; in Studio a message appears over the prompt bar.

What you seeWhat it meansWhat to do
"You have as many sandboxes as you may: …"You are at your plan's count of sandboxes at once.Close previews you no longer need, stop a run that is going, or delete a chat you are done with. An idle sandbox also ends by itself.
"Your sandboxes together use all the memory your plan gives them: …"Their memory together is at your plan's limit.End a sandbox you no longer need, then try again.
"Every sandbox machine is busy right now; try again in a few minutes"The service's machines are full, not your plan.Wait a few minutes.
"The machine this project runs on is not responding. …"The machine holding the sandbox stopped answering.Try again in a few minutes.

Note: When you are at your count of sandboxes, starting a new one may end the chat sandbox you have not used for longest instead of refusing. Its folder is kept as a file of the chat, so nothing is lost.

When a run ends without its work

What you seeWhat to do
"It ran out of time. Its work so far is kept"Choose Continue on its card to go on in the same session.
"It stopped before it changed anything. Continue, or pick a stronger model"Choose Continue, make the task more precise, or give it a stronger model.
"It lost its connection to your model provider. Its work so far is kept"Choose Continue.
"Its worker stopped before it ended, as when the app restarts or the computer sleeps. Its work so far is kept"Shown as Interrupted. Choose Continue.
"It could not be started. Try again"Try again.
"Its program could not be set up in the sandbox. Try again"Try again.
"It failed while it worked"Read its report on the card, then try again or reword the task.
"The machine its sandbox ran on stopped responding"Try again in a few minutes.
"It was stopped"You, or the end of its run, stopped it.

Continue is offered when a run ran out of time, was interrupted, lost its connection, or changed nothing. It sends the agent on in the same session, so it keeps what it had done.

Your model provider

The coding agent runs on your own model key, so your provider's refusals reach you directly.

What you seeWhat to do
"Your model provider account is out of credit. Add credit, or pick another key"Add credit at your provider, or pick another key.
"Your model provider rejected your key. Check it in Settings → Model"Check or replace the key.
"Your model provider is rate limiting your key. Try again in a moment"Wait, then try again.

Free runs

If your plan includes free coding agent runs, these may appear:

What you seeWhat to do
"Your free coding agent runs for this month are used up. …"Add your own model key in Settings, upgrade your plan, or wait for next month's runs.
"Free coding agent runs are not available right now. …"Try again later, or add your own model key.
"It used all of this free run's budget before it finished. …"Continue in a new run, or add your own model key.

In Studio, once the month's free runs are used up and you have no key that runs an agent, the project page says so and holds the prompt bar. See Sandbox and coding agent.

Out of memory

What you seeWhat to do
"Its sandbox ran out of memory. Your files are kept: …"Install dependencies once, remove old builds, and try again.
"Its sandbox probably ran out of memory. …"The same.

When a sandbox runs out of memory, a new one is made on the same files and you are told. If the message also suggests upgrading, a larger plan gives sandboxes more memory.

Previews that do not build

When the app's build fails, its card or the preview dialog shows the end of the build's log. Common causes:

  • The project's commands are wrong. Open Files, choose Build and preview, and correct the install, build, or start command.
  • The server listens on the wrong port, or only on its own address. The failure says where it listens; ask the assistant to make it listen on the port it is given.
  • The build ran out of memory. See above.

When the sandbox ended

A chat's sandbox ends after it sits unused, and its folder is kept as a file of the chat. Files still downloads it. Work that needs a sandbox after that starts a fresh, empty one. A Studio project's files and history come back when you open the project again.