---
title: "Your Claude Code sessions are your best data, and by default they're deleted after 30 days"
author: "Stan Voo"
url: https://www.99rabbits.com/blog/your-claude-code-sessions-are-your-best-data
published: 2026-10-22
updated: 2026-10-23
summary: "Claude Code writes every session to a plaintext file and deletes it after 30 days without a word. Eight months of mine turned out to be the most honest record of how I work. Here is what I'd keep, and what I'd mine it for."
---

# Your Claude Code sessions are your best data, and by default they're deleted after 30 days

Claude Code writes every session to a plaintext file under `~/.claude/projects/`. [By default it keeps them for 30 days](https://code.claude.com/docs/en/data-usage), and then a background sweep [deletes them without showing a message](https://code.claude.com/docs/en/settings-reference#cleanupperioddays).

I think those files are the best data I have about my own work. They record what I asked for, how I asked, where I corrected the model and what I gave up on. Nobody writes that down by hand.

## One session at a time, and across sessions

At the end of a working session I already have Claude write a short reflection: what I corrected, which rule is worth keeping. That works one session at a time, and it can't see a pattern that only shows up across sessions.

Reading all the transcripts can. One read found about 21 sessions where I had asked, in different words each time, for the same thing: where does this session stand, what is closed, what is still open. Now it's a command, `/recap`. My working rule since: a request you repeat is a skill waiting to be written.

## What the record shows

I typed roughly 11,500 messages from March to October. Nearly a quarter went to Alisa.ua, the online store I built, mostly from March to May. Building my own products took about 14%, and Claude Code itself about 13%: settings, skills, the machinery around it. Media and ad creative took about 12%.

## What the existing tools miss

I also read the source of five open-source tools that parse these files: [cc-transcript](https://github.com/yasyf/cc-transcript), [introspect](https://github.com/0xDarkMatter/claude-mods), [claude-code-analytics](https://pypi.org/project/claude-code-analytics/), [claude-hindsight](https://github.com/Codestz/claude-hindsight) and Simon Willison's [claude-code-transcripts](https://github.com/simonw/claude-code-transcripts). Each is built for its own job: HTML pages, search, dashboards.

None of the five sorts sessions by who started them.

What was said lives in three places, not one. Most of it is in ordinary user lines. Lines marked "meta" hold the messages another session sent this one, which you want, and every skill file Claude loaded, which you didn't write. Four of the five ignore that mark, so a meta line looks like something you typed. And a prompt you type while Claude is still working is stored as a different kind of line, which only cc-transcript reads.

And none of the five removes secrets.

## The files hold secrets

A scan of mine found dozens of strings shaped like API keys. Almost none were in anything I typed; they came in with the work, through files the model read and commands it ran. Some were keys I still use.

## What I'd do with yours

- I'd raise `cleanupPeriodDays` in `settings.json`. Setting it to `0` fails validation, and the docs suggest a large value such as `3650`. I set 3650.
- I'd back the folder up off the machine, encrypted, and never into git.
- I'd parse it once into a small corpus and dig into it, instead of the raw files. Mine keeps the facts for each session and the text of each message, drops tool results, redacts anything shaped like a credential, tags each session by who started it, and keeps its rows after Claude Code deletes the transcript.

## What I'd mine it for

- **Requests I repeat.** Each one is a skill or a command waiting to be written. That is where `/recap` came from.
- **Corrections I repeat.** A correction that turns up in several sessions is a rule for `CLAUDE.md` or a skill, not something to say a fourth time.
- **Questions I keep asking.** About half my sessions about Claude Code itself were three messages or fewer, mostly a quick "how do I…". The answers are worth a note I can find again.
- **Permissions I keep approving.** Commands I allow by hand every day are allow rules waiting to be written. Claude Code comes with a [`/fewer-permission-prompts`](https://code.claude.com/docs/en/commands) skill that does this for the read-only ones.
- **Kinds of work that recur.** Sorted by kind, my sessions suggested which jobs could go to an agent of their own: nine candidate roles, from an ads operator to the Alisa.ua work.
- **Secrets that came in with the work.** Anything shaped like a key, so the live ones can be rotated.
