← Journal · Checklist

Keep your Claude Code sessions longer than 30 days

SessionBack · Oct 16, 2026 · 3 min read
Smiling woman with glasses looking up

Switching accounts only hides sessions. There is one thing that really removes them: Claude Code’s automatic cleanup. By default, transcripts of sessions that were inactive for longer than 30 days are deleted when Claude Code starts. If you come back to a project after two months, the conversation may be gone for good.

1. Raise the cleanup period

Open ~/.claude/settings.json and add the setting cleanupPeriodDays, for example one year:

{
  "cleanupPeriodDays": 365
}

If the file already has other settings, add the line inside the existing braces and keep a comma between entries. The new value applies from the next start.

2. Keep an eye on disk space

Long sessions with large files can grow to several gigabytes over a few months. Check the size from time to time:

du -sh ~/.claude/projects

Make room with other files first. A transcript you delete can’t be resumed.

3. Back up the folder

Include ~/.claude in your Time Machine or other backup. It holds every conversation you had with Claude Code on this Mac.

4. Make old sessions visible again

Kept transcripts are only useful if you can open them. After an account switch, SessionBack puts every session of this Mac back into the sidebar of the account you’re signed in to, with its full chat.

Let the sidebar remember.

SessionBack finds every session on this Mac that the signed-in account can’t see and puts it back. Free, local only, one click to undo.

Get SessionBack →

Photo: Unsplash, illustrative.