recallnor

Guide

cleanupPeriodDays explained

About 3 minutes to read

cleanupPeriodDays sets how long Claude Code keeps its local files. If a file is older than this number of days, Claude Code deletes it. The default is 30 days.

What gets deleted

According to Anthropic’s documentation, this includes:

Allowed values

How to change the period

In ~/.claude/settings.json (for all projects):

{
  "cleanupPeriodDays": 365
}

A longer period doesn’t bring back what has already been deleted.

Sessions from the Claude desktop app

According to the documentation, Claude Code keeps sessions that were started or last resumed in Claude Desktop or Cowork regardless of their age. Since version 2.1.248 there is a separate period for them: desktopSessionCleanupPeriodDays.

Long period or your own archive?

A long period keeps the files on disk, but to find things again you only have claude --resume and its list. Recallnor reads the sessions as they are written, searches them in full text, keeps them even with a short period and gives them to Claude Code via MCP to look things up. Recallnor only reads the setting and never changes it.

Recallnor saves every Claude Code session on your Mac before Claude Code deletes it, makes it searchable and lets Claude Code look things up in it via MCP. Free for the last 30 days; Pro is a one-time $29, or $19 until 31 January 2027. Same amounts in euros.

Download free

As of December 2026. Sources: Anthropic: Explore the .claude directory, Anthropic: Data usage, Simon Willison: Don’t let Claude Code delete your session logs.