code-anything.com
Sign inStart free

Agents: reference.

What the agents on code-anything actually do, what triggers them, what they may touch, and the limits they run inside — accurate to the running system.

Two kinds of agent

An agent is a model given a goal, a set of tools and permission to use them in a loop until the goal is met or a budget runs out. Here that covers two very different things, and keeping them apart is how you neither over-trust the automation nor under-use it.

The build agentA standing agent
When it runsInside every build, on every plan. You do not switch it on.After the build has ended, on a cadence or an event — only once you install it.
What it doesReads the code, plans, writes files in a disposable sandbox, runs commands, then checks and repairs its own output.Either checks that a URL is up, or runs a prompt against the project.
Where you see itThe build’s verdict, its Verify surface and its trace.The project’s Agents tab — yours to add, pause and delete.

Everything below is what the system does today. Where a behaviour is opt-in, it says so; where something needs a human, it says who and when. For the surrounding product — preview, deploy, repository, environment — start at the getting-started guide.

Automatic repair inside every build

The real autonomous correction. It happens whether or not you ever open the Agents tab — four parts, in the order they run.

  1. Four gating checks, in order. Typecheck, then the test script, then the production build, then a scan of the dev-server log for runtime and compile errors. Each check records whether it passed and why it failed, so a past build stays inspectable.
  2. Up to three repair rounds. A failing check hands the agent the failure output. It repairs and re-checks, up to three rounds inside one plan — and if that still does not get it green, it takes one full replan rather than retrying the same edit.
  3. A behavioural and a visual pass. A second reviewer with none of the build’s history judges the diff against what you asked for and clicks through the running preview. A separate visual pass crawls the rendered pages. Both can seed one more repair.
  4. Accepted only when green and in scope. A build is accepted when the checks pass and the diff matches what was asked for. Anything else is held for your review with the verdict and the reason attached — it is never shipped broken.
verify — the gating checks, in order
typecheck   npm run typecheck (or tsc --noEmit)
tests       npm test --if-present
build       npm run build --if-present
preview     scan the dev-server log for runtime errors
✗ typecheck failed — repairing (round 1 of 3)
✓ typecheck
✓ tests
✓ build
✓ preview — no runtime errors in dev log
verdict: accept

What “held for review” means

A build ends with one of three verdicts: accepted, held for review, or rejected. Held means the agent finished but is not confident enough to call it done — a check it could not get green, or a diff that drifted outside what you asked for. You get the verdict, the reason and the list of files it touched, and you decide. A rejected run also fires a lifecycle event, so a standing agent subscribed to run_rejected can act on it. With a repository connected, accepted work reaches you as a pull request rather than a commit on your default branch.

  • The four gating checks are the same on every plan. The build tier decides how many extra repair rounds the behavioural and visual passes get — none on a prototype build, one each on a standard build, two each at the highest tier.
  • A JavaScript project with no TypeScript config, or a project with no test script, records that check as skipped rather than inventing a pass.
  • If the behavioural or visual harness cannot be reached, that pass records as skipped and does not block your build — the four deterministic checks still gate it.
  • A separate security scan runs when you Go Live, and a P0 finding blocks the publish outright.

Sandbox verification ›

Standing agents

Three shapes. They differ less in how they are triggered than in what they are permitted to touch: a health check observes, a prompt agent acts.

AgentHow it firesWhat it doesCost per run
Health checkOn a cadence — every 5 minutes at the fastestOne GET against your preview or live URL, capped at 8 seconds. Reads the status and the first 16 KB of the body. Changes nothing.Free — not metered
Scheduled promptOn a cadence — every 60 minutes at the fastestRuns your standing instruction as a full build against the project, verified like any other build.1 runtime credit
Lifecycle eventWhen a deploy fails, or a build run is rejectedSame as a scheduled prompt, fired by the failure rather than by the clock.1 runtime credit
Business eventWhen your app reports one of seven commerce events over a signed endpointSame as a scheduled prompt. Idle until your app is actually wired to report the event.1 runtime credit
  • A project that has never been previewed or deployed has no URL to point a health check at yet.
  • Every standing agent can be paused and resumed without deleting it; its cadence and target are visible on its card.
  • An event agent whose event nothing fires yet sits idle rather than pretending to work. The interface only offers lifecycle events that something really emits.

Preset agents

Presets exist for a storefront and for repository upkeep. Installing one starts it right away, behind a confirmation that says exactly that. Presets that arrive with a new project come switched off.

RolePresetsTrigger and output
ShopkeeperProduct sourcing, repricing, order fulfilmentDaily, daily, every 15 minutes. Fulfilment is a call to the live store: no model, no credits, no code changes.
RestockerLow-stock reorderEvent inventory.low. Drafts purchase orders for the owner to approve.
Support helperCustomer supportEvent support.ticket. Escalates refunds and policy questions to the owner.
CaretakerWeekly security check, weekly dependency update, red-build repair, plus repo maintenance, issue triage, support-to-fix and dependency upgradeWeekly, weekly, repo.ci_failed. Needs a linked GitHub repository. The output is a pull request the agent never merges; auto-merge of dependency PRs is a separate per-project opt-in, off by default.
WatcherHealth checkAn interval, with a five-minute floor in the interface.

What is checked, and how often

There is no fixed monitoring interval to quote. There is a heartbeat, and a due-ness rule.

A scheduled trigger calls the control plane once a minute. That call does not run everything — it loads the enabled agents and asks the scheduler which are due. An interval agent is due when it has never run, or when the gap since its last run has reached its own cadence. So the heartbeat is per-minute; how often your agent runs is the cadence you gave it, floored at five minutes for a check and sixty for a prompt.

A health check does exactly one thing: a GET against the URL, with an eight-second deadline, reading the status and up to the first 16 KB of the body. That bound is why a check is free, why a dead target cannot stall the heartbeat for every other project, and why a check has no way to modify anything. The same heartbeat also sweeps stale build runs: a run still marked running after twenty minutes that has also gone fifteen minutes without writing a step is closed out as failed.

What happens when a check fails

Every run is recorded with a status of ok, alert or error. Severity is derived from the failure, not configured — there are no thresholds to tune.

ConditionHow it is detectedSeverityWhat the alert says
The URL does not respondConnection error, or no answer within the 8-second timeoutCritical“preview unreachable” / “deploy unreachable”, with the connection error
A server errorHTTP status 500 or aboveCritical“returned HTTP 5xx”, with the URL and the exact status
Another failure statusAny other non-OK status — 404, 403, redirect loopsWarning“returned HTTP 4xx”, with the URL and the exact status
The page loads but shows an errorHTTP 200, but the first 16 KB matches a known error signature — a Vite overlay, “internal server error”, “failed to compile”, “cannot find module”, a Next.js client-side exception pageWarning“is serving an error”, quoting the first matching line
The agent itself brokeA prompt agent timed out against its 120-second wall clock, or threwCritical“failed to run”, with the reason — recorded as errored, never silently skipped
The agent could not finishA prompt agent stopped short — out of runtime credits, over the spend cap, or a run it could not get greenWarning“could not complete”, with its reason — the agent pauses itself

Recorded, surfaced, then delivered

  1. Recorded first. The alert is written to the project alongside the run that produced it, before anything is delivered. That record is the source of truth and survives whatever happens to a delivery attempt.
  2. Surfaced on the Agents tab. Open alerts appear at the top of the project’s Agents tab, newest first, marked by severity, each with the failing agent, the title and the detail. Dismissing one acknowledges it, and Mark all read acknowledges them all; the record is kept.
  3. Emailed to the owner. Where alert email is configured for the workspace, a critical alert also goes at once to the address on the project owner’s profile; info and warning alerts still open are sent once a day as a single digest, grouped by project and agent. Delivery is best-effort and never blocks or fails the check.
what an alert email carries
Subject: [Alert] preview returned HTTP 502

CRITICAL

preview returned HTTP 502

GET https://your-project.preview.example → 502

Open the project's agents: https://code-anything.com/projects/…/agents

— code-anything agents (automated monitoring)

There is no Slack, webhook or paging integration for alerts today. If you need one, say so on the enterprise page.

What is automated, and what stays your decision

The rule the platform is designed around: everything reversible is automated, and everything irreversible waits for a person.

StageHandled for youYour decision
PlanningThe agent drafts the screens, data model and approachRedirect it in a sentence before it writes anything
InfrastructureThe data, auth, payments and security code is written in from vetted bricks; hosting runs on CloudflareWhether the project needs them, which accounts to connect, and what it stores
Writing codeThe agent writes and edits inside a sandboxWhat good looks like, stated in the brief
VerificationTypecheck, tests and build run automaticallyWhat your checks actually assert
DesignTemplates and palettes are applied consistently across the appWhich template, which palette, and the final art direction
MergingThe pull request is opened with results attachedReading the diff and pressing merge
PublishingThe build and deploy pipeline runsPressing Go Live, and pointing your domain
RecoveryHealth checks and alerts run continuouslyChoosing to roll back
No merge, no deploy and no domain change happens without an explicit action from you. It is why a repository change is a pull request rather than a commit, why going live is a button rather than something that happens when the build turns green, and why a rewind snapshots the current state before it runs.

What an agent may do alone, and what needs you

Every tool call is evaluated before it runs. The answer is allow, ask, or refuse — and some things are refused no matter who is asking.

ActionWho decidesWhy
Read a file, search the tree, list files, screenshot the previewOn its ownPure reads. Allowed in every mode, including read-only runs.
Write, edit or patch a file inside the sandboxOn its ownThe sandbox is throwaway, and every accepted build is checkpointed to version history first.
Run an ordinary shell command in the sandboxOn its ownInstalls, builds, test runs — bounded by the run’s step and spend budget.
Generate an image or a video into the projectOn its ownTreated as a file write; metered like any other model work.
Run a destructive commandAsks firstForce-push, rm -rf, curl piped into a shell, find -delete, git reset --hard, git clean -f, or a production deploy command. Escalated even inside the sandbox; the run blocks until you answer.
Write to a protected pathRefusedThe .git and .github trees, any .env file, certificates and private keys, SSH identities, AWS credentials, named secrets files. Hard-denied in every mode; approval cannot unlock it.
Ship a change to your repositoryYou merge itWith a repo connected, the edit path opens a pull request you review and merge.
Install a standing prompt agentYou opt inNothing installs one for you. One you install starts immediately, behind a confirmation naming its cadence, its credit cost, and that it edits code unattended.
Answer an escalated tool callYou have 3 minutesAn approval request unanswered for three minutes is auto-denied and the run continues with that call refused — it never defaults to allowing.

Why your app cannot claim its own build broke

Business events arrive from your app through a per-project endpoint, signed with a token held in the encrypted vault and valid inside a five-minute window. Lifecycle events — deploy failed, run rejected — are our own observations and are fired in-process only. The asymmetry is deliberate: if an app could assert its own lifecycle events over the wire, a compromised storefront could trigger unattended repair builds simply by lying about its health. Secrets and connections live on the project’s Environment surface, never in the agent’s reach.

Investigating an incident, in order

Six surfaces, each answering the next question. Nothing here needs a support ticket.

  1. Open alerts (Agents tab). Every unacknowledged alert, newest first, colour-coded by severity — the title, the URL, the status, the matched error line, and the agent that raised it.
  2. That agent’s run history. History on the agent shows its last twenty runs with a status of ok, alert or error, a one-line summary and a timestamp — enough to tell a first failure from the third in an hour.
  3. The build behind it (Verify and trace). Every build shows the gate as it ran — which check passed, which failed, and the verdict — plus a span timeline with the model used, the tokens, the cost, and each check’s result.
  4. The release that changed things (Repository → Deploy). Every Go Live, what shipped, when, and whether it failed.
  5. The build that introduced it (Repository → Changes). Recent runs with their verdict, the reason, and the files each one touched. A held build tells you what the agent itself refused to ship.
  6. Rewind, or roll the canary back. Repository → Changes carries build checkpoints and a durable version history. Both snapshot the current state first, both refuse while a build or deploy is in flight, and a provisioned database is restored alongside the code. A release that went out as a delivery flight rolls its canary cohort back on its own — by default on the first recorded error, or once enough of the cohort rejects it.

The limits agents run inside

Real numbers from the running system, with the reason each one exists.

LimitValueWhy it exists
HeartbeatEvery minuteThe engine then decides which agents are actually due.
Health-check cadence floorEvery 5 minutesPoliteness towards the target you are probing. Anything slower is fine.
Prompt-agent cadence floorEvery 60 minutesEach prompt run is a metered build, so one agent is capped at roughly 24 runs a day.
Health-check probe timeout8 secondsOne slow target can never stall the heartbeat for everything else.
Prompt-run wall clock120 secondsA hung build is aborted and recorded as errored rather than left hanging.
Prompt agents running at once3 per tickHealth checks stay fully parallel; only the expensive prompt builds are queued.
Run history kept per agentLast 20 runsIn the History drawer on the Agents tab.
Open alerts listedUp to 20 unacknowledgedDismissing acknowledges an alert; the row itself is kept.
Unanswered approval requestAuto-denied after 3 minutesA blocked run fails the call closed rather than open.
Model steps in one work itemCeiling of 200A runaway backstop, not a spend limit. Spend is governed separately.
Stuck-loop detection3 identical calls, or 5 steps with no progressEnds the attempt instead of burning your budget.

Per-run budgets, by plan

PlanSpend ceiling per runModel steps per runBuilds at once
Free$0.50301
Starter$2.00603
Pro$5.001006
Team$10.0016012
Plan defaults for the run guard. Where the account’s credit balance is known, spend is bounded by what that balance can afford instead, and the stuck-loop detectors become the practical ceiling. A run that hits a limit stops and reports.
  • A prompt agent whose account is out of runtime credits pauses itself and records why.
  • A prompt trigger is charged once per firing — a retried heartbeat cannot double-charge the same run.
  • Standing workspace monitoring is a paid feature from Pro upward; automatic build repair is on every plan, free included.

Compare plans ›

Agents questions, answered

What does "agent" mean on code-anything?

Two different things. The first is the agent that builds your app: it plans, edits files in a disposable sandbox, verifies its own work and repairs what failed before you ever see the result. That one is always on and runs inside every build. The second is a standing agent — an automation you install on a project that keeps running after the build ends, either checking a URL on a cadence or running a prompt on a schedule or an event.

What runs continuously without me switching anything on?

The verify-and-repair loop inside every build. It runs typecheck, your test script, the production build and a scan of the dev-server log for runtime errors, repairs failures and re-checks up to three rounds, and adds a behavioural and a visual pass. A build is accepted only when it is green and in scope; otherwise it is held for your review. Standing agents are the opposite — nothing watches your live URL until you add a health check yourself.

How often do health checks actually run?

A scheduled trigger fires once a minute and asks the control plane which agents are due; the engine then runs only those whose cadence has elapsed. In the interface the floor for a health check is every five minutes, and you can set anything slower. A check is a single GET with an eight-second timeout, so one unresponsive target cannot hold up anything else.

What counts as a failed check?

Four things. The URL not responding at all, or not answering inside eight seconds, is critical. An HTTP status of 500 or above is critical. Any other non-OK status is a warning. And a page that returns 200 but whose first 16 KB matches a known error signature — a Vite error overlay, "internal server error", "failed to compile", "cannot find module", a Next.js client-side exception page — is a warning, with the offending line quoted back to you.

Do agents fix things by themselves when a check fails?

A health check never does. It probes the URL, records the run and raises an alert — which is why it is free and cannot damage anything. Repair is a separate, opt-in choice: you can install a prompt agent triggered by a failed deploy or a rejected run, and that agent runs a real build against your project unattended. Installing one takes an explicit confirmation naming its cadence, its credit cost, and the fact that it edits code with nobody reviewing the change first.

How do alerts reach me?

Every alert is written to the project and appears under Open alerts on that project’s Agents tab, with its severity, title and body, until you dismiss it. When alert email is configured for the workspace, a critical alert is also emailed at once to the address on the project owner’s profile — severity in the subject, the failure detail in the body, and a link back to the Agents tab. Info and warning alerts are collected into one daily digest email per owner instead, grouped by project and agent. Mark all read on the Agents tab acknowledges every open alert at once. Email delivery is best-effort: a bounced or unconfigured send never stops the check or loses the alert.

Which events can an agent be triggered by?

Two lifecycle events that we observe ourselves and fire in-process: a deploy that failed, and a build run that was rejected. Plus seven business events your app reports about itself — an order created, an order paid, an order needing fulfilment, low inventory, an abandoned cart, a support ticket, a failed payout. Business events arrive through a signed, per-project endpoint with a five-minute replay window. Lifecycle events cannot be asserted over the wire, so a compromised app cannot trigger an unattended repair run by lying about its own health.

What can an agent never do, even with my approval?

Write to a protected path. The .git and .github trees, any .env file, certificates and private keys, SSH identity files, AWS credentials and named secrets files are hard-denied in every mode — approval does not unlock them, and a multi-file patch that touches one is rejected whole. Separately, destructive shell commands always stop and ask, even inside the disposable sandbox: force-push, rm -rf, piping a download into a shell, find -delete, git reset --hard, git clean -f, and production deploy commands.

What does a standing agent cost?

A health check is free — it is one bounded GET and it is not metered. A prompt agent spends one runtime credit per trigger, charged once per firing even if a tick is retried, and if the account is out of runtime credits the agent pauses itself and says so in its run history rather than failing silently.

Can I undo what an agent changed?

Yes, though not with a single rollback button. Every accepted build is checkpointed, and Repository → Changes gives you two restore paths: build checkpoints you can rewind the sandbox to, and a durable version history that survives the sandbox being recycled and lets you diff any file against the previous version before you restore it. Both snapshot the current state first, both refuse while a build or deploy is in flight, and where the project has a provisioned database its data is restored alongside the code. A release staged as a delivery flight also has its own gate that rolls the canary cohort back without a human.

Which plans include continuous monitoring?

Standing workspace monitoring is a paid feature from the Pro plan upward, and Team adds priority monitoring and alerts. The automatic verify-and-repair loop inside every build is not a plan feature at all; it runs on every build on every plan, including free.

Do agents run against my live app or a copy?

A health check fetches whichever URL you pointed it at — your preview URL or your live URL — exactly as a visitor would. A prompt agent works the way any build works: it edits inside the project’s disposable sandbox and is verified there, not against production. What it produces reaches your repository as a pull request when a repository is connected.

Workspace monitoring ›

Start your first build.

Describe an app or connect a repo — free to try, with nothing to configure.