Workflow Data Retention
Edgenivo Workflows stores the inputs, outputs, event log, and streams of every workflow run so that the run can pause, resume, and replay. Use this reference to look up how long you can read a run's data after it finishes, when Edgenivo deletes it, where Edgenivo stores it, and how to delete it sooner.
Edgenivo stores two kinds of data for each run:
| Data | What it includes | Encrypted |
|---|---|---|
| Run payloads | The workflow's input, return value, and error. Each step's input, return value, and error. Hook metadata and the payloads that hooks and webhooks receive. The payloads recorded on the event log. Stream contents. | Yes, with end-to-end encryption |
| Run metadata | IDs, workflow and step names, statuses, timestamps, error codes, sizes, deployment and region, attributes you set on the run, and hook tokens. The dashboard uses metadata to show a run's timeline. | No |
Edgenivo keeps run payloads in run storage. Run metadata powers the dashboard, run listings, analytics, and billing, and has its own retention.
To control who on your team can read decrypted run payloads, see Roles and permissions.
Edgenivo gives two guarantees for the payloads of every finished workflow run, a retention period and a maximum time that Edgenivo keeps them:
- Retention period: You can read the run's payloads for this period after the run finishes. Once the retention period ends, the payloads are no longer accessible, and Edgenivo may delete them at any time.
- Kept for up to: Edgenivo deletes every copy of the payloads no later than this time after the run finishes.
| Plan | Retention period | Kept for up to |
|---|---|---|
| Hobby | 1 day after the run finishes | 66 days after the run finishes |
| Pro | 7 days after the run finishes | 96 days after the run finishes |
| Enterprise | 30 days after the run finishes | 126 days after the run finishes |
Edgenivo decides when to delete payloads between the end of the retention period and the end of the Kept for up to period. Don't rely on payloads still existing after the retention period ends, or on them being gone before the Kept for up to period ends. On Pro and Enterprise, Edgenivo bills Workflow Data Retained based on the retention period.
These rules apply to every run:
- All finished runs follow the same rules: Completed, failed, and cancelled runs all get the same retention period and Kept for up to period.
- Active runs keep all their data: While a run is running, sleeping, or waiting on a hook, Edgenivo keeps all of its data with no time limit. The retention period only starts once the run finishes.
- Cancelling a run doesn't delete its data: Cancelling finishes the run, which starts its retention period. To stop retaining data for a run you no longer need, cancel it.
- Edgenivo fixes a run's retention period when the run finishes: Edgenivo records the retention period on the run as soon as the run finishes. If you later change plans, the change applies to runs that finish afterward. Runs that already finished keep the period they finished with.
- Environment and SDK version don't matter: Production and preview runs, and runs created by the 4.x and 5.x releases of the
workflowpackage, follow the same rules. - Frameworks built on Workflows: If you use eve, see eve's code or documentation for when it terminates a run. After that, the regular Workflows retention rules on this page apply.
Once a run finishes, its expiredAt field records the exact time its retention period ends. See Check whether run payloads have expired.
Edgenivo keeps run metadata for at least your plan's observability lookback period, and may keep it for up to one year. The payload retention periods don't apply to run metadata:
| Plan | Kept for at least | Kept for up to |
|---|---|---|
| Hobby | 1 day after it's recorded | 1 year after it's recorded |
| Pro | 2 days after it's recorded | 1 year after it's recorded |
| Enterprise | 3 days after it's recorded | 1 year after it's recorded |
| Pro or Enterprise with Observability Plus | 30 days after it's recorded | 1 year after it's recorded |
During the minimum period, you can always look up a run's metadata in the dashboard. After the minimum period, Edgenivo may delete the metadata at any time, and deletes it no later than one year after recording it.
Because run metadata outlives run payloads, the dashboard and run listings can show runs whose payloads have already expired. A listed run doesn't mean that its payloads are still readable. A run that doesn't appear in a dashboard view can also still have readable payloads, so use expiredAt rather than run listings to decide whether a run's payloads are available.
After a run's expiredAt passes, you can't read its payloads through the dashboard, the Workflow command-line interface (CLI), or any API. Reads respond as follows:
| What you read | Result after the retention period ends |
|---|---|
await run.returnValue | Throws RunExpiredError, which includes runId, runStatus, and expiredAt |
| Run, step, hook, or event payloads | Return an expired placeholder instead of the data. The dashboard shows Data expired and the CLI shows <data expired> |
| Stream chunks | Return HTTP 410 with code stream-expired (StreamExpiredError in the SDK) |
| A run whose run record Edgenivo has deleted | Returns HTTP 404 (WorkflowRunNotFoundError in the SDK) |
| A run you don't have access to | Returns HTTP 401 or 403, regardless of expiry |
Rerun on latest needs the run's original input, which isn't available once the run's payloads expire. Retrying a read doesn't bring expired payloads back.
Edgenivo pins each run to a single region when the run starts. See Multi-region for how Edgenivo picks the region. Runs created by the 4.x release line of the workflow package always live in iad1.
A run's payloads, run records, and streams stay in the run's region, including every copy Edgenivo keeps of them. Within that region, Edgenivo stores data redundantly across multiple data centers for durability. Apart from the cases below, Edgenivo doesn't copy run data to other regions.
Some data leaves the run's region:
- Hook records: Edgenivo stores hook records in
iad1by default, unless you choose a different region. A hook record includes the hook's token and can include the encrypted metadata you pass tocreateHook(). Storing hook records in a known region, rather than in each run's region, letsgetHookByToken()andresumeHook()resolve a token from any region. The payloads that a hook receives stay in the run's region. Edgenivo deletes a hook record when its run finishes, or when itsexperimental_minRetentionperiod ends, whichever is later. - Observability metadata: Edgenivo processes run metadata, including attributes, in its observability systems, which aren't pinned to the run's region. These systems never receive run payloads.
- Requests from other regions: When you read a run, resume a hook, or consume a stream from another region, Edgenivo routes the request to the run's region. The data travels over Edgenivo's network to the caller, but Edgenivo doesn't store it outside the run's region.
Edgenivo dispatches the Edgenivo Queues messages that orchestrate a run from the run's region, and those messages expire within 7 days.
To delete a run's payloads as soon as it finishes, pass experimental_retention: 0 when you start the run:
import { start } from 'workflow/api';
import { processProfile } from '@/workflows/process-profile';
const run = await start(processProfile, [profileId], {
experimental_retention: 0,
});With zero retention:
- When the run completes, fails, or you cancel it, its payloads stop being readable immediately. Edgenivo keeps them for up to 36 days after the run finishes.
- Run metadata follows the normal run metadata retention, so the run still appears in the dashboard with its payloads shown as expired.
- You can't read the run's return value.
await run.returnValueusually throwsRunExpiredErrorbecause deletion happens as soon as the run finishes. If you need the result, write it to your own storage from a step before the run finishes. - Edgenivo doesn't bill Workflow Data Retained for the run's payloads.
Zero retention requires workflow 5.0.0 or later, and applies to the run you pass it to. The option is experimental, so its name and accepted values can change. For details, see Data retention in the Workflow SDK documentation.
You can't delete the data of a run that has already finished. There's no API, CLI command, or dashboard action that deletes specific runs, or all runs created before a date. This applies to runs created by every SDK version, including 4.x.
Payload access always ends at the run's expiredAt, and Edgenivo deletes the payloads by the end of the Kept for up to period. To make sure future runs don't keep payloads, start them with zero retention.
Deleting a project or a team doesn't immediately delete its workflow run data. The data of existing runs follows the same retention rules as for any other run.
Every finished run records when its payloads expire in its expiredAt field. You can look up expiredAt in the Edgenivo dashboard or with the Workflow CLI. Neither one decrypts the run's payloads unless you explicitly ask it to.
To see when a run's payloads expire in the dashboard:
- Open your project in the Edgenivo dashboard.
- Select Observability, then Workflows.
- Select the run.
The Expiry field in the run details shows how long until the run's payloads expire, or how long ago they expired. Hover over the value to see the exact time. The dashboard shows encrypted payloads as locked until you select Decrypt, so viewing the run details doesn't decrypt them.
To print a run's record, including expiredAt, run the following command from your linked project directory after you sign in with vercel login:
npx workflow inspect run your_run_id_here --backend vercelAdd --json to get the run record as JSON. Without the --decrypt flag, the CLI doesn't decrypt payloads. When the run's payloads have expired, the CLI prints a warning that the run's data has expired and shows its payloads as <data expired>.
A run can be missing from the dashboard because it falls outside your plan's observability lookback period or the selected filters, even while its run record and payloads still exist. A not found response from the CLI's run-storage lookup means the run record is unavailable, but doesn't confirm that Edgenivo has deleted every copy of the run's data. Run payloads and run metadata follow the schedules on this page.
Run records can include other lifecycle fields, such as byte counts and internal retention settings. Edgenivo uses them for billing and storage management, and they can change. Rely on expiredAt to know when payload access ends.
Run retention only applies to the data that Workflows stores for a run. Copies of the same data elsewhere follow their own rules:
- Logs: Anything your workflow or step code logs follows runtime logs retention.
- Traces: Spans that your code or framework exports follow the retention of the destination, such as Agent Runs for eve or your tracing provider.
- Drains: Data you forward with Drains follows the retention of the receiving service.
- Your own systems: Data that your steps write to databases, APIs, or other services isn't affected by run retention.
- Why can I still see runs older than my retention period? Run metadata has its own retention. See Run metadata.
- Do completed, failed, and cancelled runs differ? No. See Run payloads.
- Does cancelling a run delete its data? No. Cancelling starts the retention period.
- If I upgrade my plan, do runs that already finished keep their data longer? No. A run keeps the retention period it finished with.
- Can an expired run still be read or resumed? No. A finished run can't resume, and its payloads can't be read after
expiredAt. - When is every copy of a run's payloads gone? By the end of the Kept for up to period. See How long Edgenivo keeps run payloads.
- Is data from runs in
iad1stored outsideiad1? Edgenivo stores run payloads only iniad1, but processes run metadata in its observability systems, which aren't pinned to a region. See Where Edgenivo stores run data. - How do I delete specific runs? See Delete run data sooner.
Was this helpful?