Skip to main content

seed_transcript_retention_if_missing

Function seed_transcript_retention_if_missing 

Source
pub fn seed_transcript_retention_if_missing(
    provider: &ProviderConfig,
    config_dir: &str,
) -> Result<bool>
Expand description

Seeds cleanupPeriodDays into an isolated Claude Code config dir’s settings.json when it isn’t set. Claude Code’s default is 30 days, and its startup sweep deletes transcripts under <config_dir>/projects, which AgentMux junctions to the account’s shared history — so any channel that launched an agent without this setting deleted every channel’s month-old conversations, leaving --resume nothing to find.

Claude only. Leaves an explicit cleanupPeriodDays alone, and never rewrites a settings.json it can’t parse as a JSON object. Callers must only pass a dir already confirmed not to be the operator’s ambient home. Returns Ok(true) only when it wrote the setting.