Delete a run's data on demand in Workflow SDK
Vercel’s Workflow SDK now allows on-demand deletion of stored data from completed runs to meet compliance or security needs, while preserving metadata for observability.
Vercel has introduced a feature in the Workflow SDK that enables users to delete stored data from completed runs on demand. This capability is designed to help teams comply with security policies or data retention regulations by removing sensitive information from run payloads. The deletion targets inputs, outputs, hook payloads, and error traces associated with the run and its related entities, ensuring no residual sensitive data remains in the system.
Importantly, the deletion does not affect the run’s metadata, which remains visible in observability tools. Users can still inspect attributes, hook tokens, and timing details for steps and events, allowing for continued monitoring and debugging. This ensures that while sensitive payload data is purged, operational insights and traceability are preserved for ongoing analysis.
The feature is restricted to finished runs; any run still in progress will be skipped and allowed to complete normally. This prevents disruption to active workflows while enabling cleanup of completed processes. Teams requiring immediate deletion upon run completion can configure this behavior using retention settings instead.
To use the new deletion capability, users must upgrade to Workflow SDK version 5.7.0 or higher. The feature is documented in the deleteRuns() reference, providing clear instructions on implementation and usage. This update reflects Vercel’s focus on providing granular control over data handling within its workflow automation tools.