Skip to content

How a run works

Every request you send becomes a run. A run always follows the same path, so a request of a known kind gives the same kind of result each time.

  1. Admit. Before anything starts, the product checks that you may do this, that your plan allows it, that you have credits, that the budget is not used up and that the stop switch is off. If one of them blocks the run, it says which one and what you can do about it.
  2. Plan. In plan mode, or for a large request, the lead persona proposes a plan. You approve it or edit it.
  3. Build. The lead works with other personas through the engine to change the app. You see each step, the files that change and the text the personas write, live.
  4. Check. The same checks run every time: a type-check, a build, and a browser check of the preview that looks for console errors and takes a screenshot.
  5. Fix. If a check fails, automatic fixes go first: the formatter, the linter’s fixes and a table of known errors that each have a fixed repair. If that is not enough, an agent gets at most three fix rounds.
  6. Record. The result is saved as a restore point, and usage and audit entries are written.
  7. Finish. The preview shows the result, or the run stops at Needs you with the reason.

The work is shared between personas, which are roles with fixed instructions, tools and limits. The first ones are:

  • a lead, who plans and delegates;
  • a front-end builder and a back-end builder;
  • a checker, who runs the checks and writes no product code;
  • a code reviewer and a security reviewer, who only read, and use a different model family from the builders;
  • a designer, a release operator, a docs writer and a git steward.

The Team screen lists them. A persona is a role; a character is just the name and picture a persona wears in the Studio.

The conversation shows events as they arrive: the plan, each step, tool use, file changes, checks and the cost so far. If your browser disconnects, it reconnects and receives what it missed, so nothing is lost from the view.

You can interrupt a run at any time if you have the permission to.

Some things are never done without a person. These land in Needs you:

  • publishing an app;
  • a data change that would destroy data;
  • spending past a run’s budget;
  • turning on a new connector.

An approval is an action by a signed-in member. An agent cannot create one or give one. See The security model.

  • A cost limit, a time limit and a step limit for each run; a run that reaches one stops.
  • Monthly limits per project and per organisation.
  • A spend check-in that pauses a run at a threshold and asks you.
  • A stop switch that destroys every sandbox of your organisation. Only members who hold the stop-switch permission can use it, and its use is recorded.

A failed run states one of these reasons:

Reason What it means
Checks failed The checks still failed after the automatic fixes and the fix rounds.
Cost limit The run reached its cost limit.
Time limit The run reached its time limit.
Step limit The run reached its step limit.
Interrupted A member stopped it.
Engine error The engine that drives the agents reported an error.
Rules changed The run’s rules did not match the expected version, so it stopped rather than continue.
Sandbox lost The sandbox went away during the run.
Refused The run was not allowed to start.
Internal Something went wrong inside the product.

A run that is stopped by a restart of its sandbox or of the project’s session resumes from its saved events and the last restore point.

Each run uses credits; see Plans and credits. Fix rounds are recorded on their own so that they can be priced differently from ordinary work.