Skip to main content
A version is one published, unchangeable copy of a procedure. A run is one execution of one version, or of a draft. This page explains what you can rely on for each, and how many runs work side by side. For a summary aimed at regulated operations, see Safety for regulated operations.

Versions never change

Each publish compiles your source and stores it as the procedure’s next version: 1, 2, 3, and so on. Effective assigns the number; your source doesn’t declare one. A published version is never edited or replaced. To change a procedure, publish a new version. Publishing never runs your procedure’s code. It checks the source, the declared capabilities and the declared secrets, and refuses source that doesn’t compile.

The live version

Each procedure has one live version. A run that doesn’t name a version starts the live one, and so does an invoke that names the procedure’s live route. A new version becomes live automatically only when its inputs and output are the same as the live version’s. If they differ, it is published but held, so systems that start runs keep working against the inputs they know. You make it live yourself when they’re ready. See Publish a new version. A trigger that runs live keeps its fixed inputs, so replace them when you make such a version live. Name an exact version when a run must reproduce a known version, or when a caller must never move to a newer one without a change on its side.

A run pins its version

When a run starts, it resolves the version once and keeps it. Making another version live later doesn’t change runs that already started. Each run’s details show the version it ran.

A run keeps its place

A run records the result of each step as it finishes. If the run is interrupted, for example by a restart or a deployment, it resumes from where it was. Steps that already finished aren’t run again: the run uses the result it recorded. A code step that was in progress when the run was interrupted may run again, under its retry policy. That’s why writes to your systems need care; see Writes to your systems. A run can also wait for a long time without losing its place: days for a person to answer a task or for a date to arrive in a wait node.

Child runs

An invoke node starts another procedure as a child run and waits for its typed result. The child run is linked to its parent in both directions, so you can move between them when you inspect a run.
  • The child’s version is resolved once for each invoke and reused if the step is retried.
  • The child runs as the same person as the parent.
  • If the child fails, the invoke fails. A business outcome such as “rejected” belongs in the child’s typed result, not in a failure.
  • Cancelling the parent cancels its child runs and stops their open tasks and agent sessions.

Many runs at once

Each run is separate. It has its own inputs, record, version and status, and runs don’t share values. To handle many requests, start one run for each:
  • From your system. Each start request starts one run. Use an Idempotency-Key built from your own request, such as the cancellation request ID: a retried start returns the run it already started. See Start a run.
  • From triggers. A trigger starts at most one run for each firing. Folder and event triggers start a run for each file or event, even while earlier runs are still active. A schedule trigger skips a firing while its previous run is still active, and fires at most hourly.
Inside one run, these nodes decide how much work runs at once: Items and branches can’t see or overwrite each other’s values. Tasks, agent steps and waits are allowed in them, so several can be waiting at once. Split a batch larger than 1,000 items, for example into one run per batch or one run per policy. Running items at the same time also sends requests to your systems at the same time. Set concurrency to what those systems accept. When an effect throws an ordinary error on a 429 answer, as the tutorials’ effects do, the step’s retry policy tries again after a wait. This documentation doesn’t state throughput or latency figures. Ask Effective about the volumes you plan to run.

Limits

See Limits for the rest of the file limits, and Default policy for retries.

What a run costs

A run is charged for its runtime: once for the run, once for each step and event, and for the CPU time its code uses. Each retry of a step counts as another step. An invoke counts as a step in the parent, and its child run counts as a run of its own. Waiting is free: the days a run spends waiting for a task answer or a wait cost nothing beyond the step or event that starts the wait and the event that ends it. Agent sessions, model calls and other metered calls a run makes use credits at their own prices. See Procedures in Usage and billing for the prices and an example.

Pause, resume and cancel

You can pause and resume a run from its page in the Effective app. A paused run keeps its state and continues from the same place when it is resumed; while it is paused, reading it through the API shows paused: true. The API can’t pause or resume a run, but it can cancel one. Cancelling is final. Cancelling a run that already finished changes nothing, so it is safe to retry. Only the person a run runs as and workspace administrators can control a run; access to the procedure or to one of its tasks isn’t enough. To cancel from your system, see Cancel a run.

Drafts

A draft run starts from source you send instead of a published version. Use it to try a change before you publish it. A draft isn’t a version, and triggers never start drafts. A draft can’t declare secrets. See Try a draft.

Who can see a run

Runs are shared with everyone who can run the procedure. You can start a private run that only you can see. A run in a Project also needs view access to that Project. Inspecting a run shows its inputs, each step’s inputs and outputs, its tasks and agent sessions, and its output. Effective never writes a secret’s value to the source, the version or the run record. Code that reads a secret must not return it in a step’s result, because results are recorded.