Skip to main content

apply_retention

Function apply_retention 

Source
pub fn apply_retention(
    workspace: &Path,
    policy: RetentionPolicy,
) -> Result<usize, SessionStoreError>
Expand description

Apply the retention policy, removing the oldest / stale sessions.

Returns the number of sessions removed. This bounds the otherwise unbounded growth of .vtcode/sessions/ so overhead does not accumulate on disk across a long-lived agent.