You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
SettingsArea: what it touches
ImprovementsKind: in v2.1.287,
ImprovementsSection of the release
Unclear It is not clear whether the served-calls files existed before this release or what they record.
What
The cleanupPeriodDays setting decides how many days Claude Code keeps certain files before deleting them. It now also applies to the files in the .claude/state/served-calls folder, both the finished .jsonl files and their temporary .jsonl.tmp copies.
The internal helper that works out how long to keep files used to read only the desktop session cleanup setting. It now reads whichever setting it is given, which is how cleanupPeriodDays can cover this folder.
Why
These files had no retention period before, so they could build up indefinitely. They are now cleared on the same schedule you set for cleanupPeriodDays.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added sinceA small documentation edit on All settings touched a line naming cleanupPeriodDays after this was published.Set an age limit in days for the transcripts of sessions you started or most recently continued in Claude Desktop or Cowork. Without this key, Claude Code [keeps those transcripts at any age](/docs/en/claude-directory#cleaned-up-automatica…settings-referencesee the edit
Confirmed sinceAnthropic's documentation has since written up cleanupPeriodDays, on Explore the .claude directory.* **Claude Desktop and Cowork transcripts**: Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age. To give these transcripts an age limit, set [`desktopSessionCleanupPe…claude-directorysee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear whether the served-calls files existed before this release or what they record.
Anthropic's documentation agreesAnthropic's documentation has since written up cleanupPeriodDays, on Explore the .claude directory.