Security & Compliance

Retention and legal hold

Retention days for prompts, runs, and audit logs; manual runs and scheduled cron.

6 min read

Especially for

adminownerorg admin

Typically requires permissions

org:settings:manage

Organization and workspace policies define:

  • retainPromptDays
  • retainRunHistoryDays
  • retainAuditLogDays
  • legalHoldEnabled — when true, retention jobs skip destructive deletes

The Retention page lets admins configure settings and trigger runs. Background processing uses organizationRetentionCron when ENABLE_ORGANIZATION_RETENTION_CRON is set on the backend.

Each run is recorded in OrganizationRetentionRun with dry-run or live mode and deletion counts.

Related articles