Software Data retention

Vercel enables on-demand deletion of run data in Workflow SDK

Workflow SDK feature deletes sensitive payloads from completed runs via dashboard, CLI, or API while preserving observability metadata

• Updated 30 minutes ago
O Workflow SDK passa a permitir a purga sob demanda de inputs, outputs e rastros de erro de execuções concluídas, mantendo os metadados de observabilidade
O Workflow SDK passa a permitir a purga sob demanda de inputs, outputs e rastros de erro de execuções concluídas, mantendo os metadados de observabilidade (Imagem conceitual editorial / NEWS by Box4Dev)

Understanding the Case

  • Version workflow@5.7.0 or later is required to use data deletion on completed runs
  • The deleteRuns() API removes up to 100 runs per call and ignores in-progress runs, which continue running normally
  • Metadata, hook tokens, and step timings remain visible in observability after payload purging

Vercel now allows developers to delete, on demand, stored data from completed runs in the Workflow SDK. The feature was detailed in the platform's official changelog and addresses a recurring requirement for those operating durable workflows with sensitive information: removing payloads that have already served their purpose without giving up operational history.

The announcement is by Peter Wielander, a software engineer on Vercel's Workflows team, and positions the functionality explicitly in the compliance and security domain — a scenario in which retention deadlines and data deletion requests must be met without rewriting the workflow architecture.

What the deletion actually removes

The removal covers the inputs and outputs recorded by the run, the payloads carried by hooks, and the error traces associated with the run and its related entities. This is precisely the set where personal data, temporary credentials, or third-party content captured during processing typically reside.

What remains is the audit layer. The run is still listed in observability, with attributes, hook tokens, and timestamps for steps and events still inspectable — that is, the team retains the ability to diagnose latency and behavior without retaining the content itself.

Three ways to trigger it

The operation can be triggered from the Vercel dashboard, the command line, or directly in code. In the terminal, the command is pnpx workflow delete <runId>; for runs hosted on Vercel, add --backend vercel --env preview.

At the programmatic layer, the API exposes two methods: getRun(runId).delete() for a single run and deleteRuns([runIdA, runIdB]), which accepts batches of up to 100 runs per call. The feature requires SDK version workflow@5.7.0 or later.

The boundary between purge and retention

Deletion applies only to completed runs. A run still in progress is ignored by the call and continues running to completion — a behavior that avoids interrupting durable processes midway, but requires the developer to know when each workflow ends.

For those who need the payload to disappear immediately after completion, the documentation itself points to another path: retention settings, applied automatically. On-demand deletion is therefore a surgical tool — useful for one-off deletion requests, incidents, or legacy data cleanup — and not a replacement for well-defined retention policies.

Practical impact

The separation between payload and metadata resolves a common technical impasse in workflow orchestration: deleting the content without destroying the audit trail. This makes it possible to fulfill data deletion requests while keeping historical series of duration, failures, and tool calls intact.

Operationally, the batch call of up to 100 runs reduces cleanup effort in test and production environments. The completed-runs limit, however, imposes lifecycle discipline: teams that depend on immediate purging should migrate to retention settings instead of treating deletion as routine.

Primary Source