Claude Code Ate My Homework: The 30-Day Cleanup Surprise

I had one of those developer moments today where the screen says something calm and technically accurate, while your brain hears:

“We have misplaced several weeks of your life.”

I opened Claude Code to continue working on a project I have been building pretty heavily, and instead of my familiar session I got: Session not found on disk … WTF?? I checked it was the same across projects.

That is not a sentence you want to see when your AI coding assistant has been carrying a substantial amount of project context.

At first I assumed something had broken. Maybe an update. Maybe a path change. Maybe Windows had decided to participate in software development again.

Then I found the real explanation.

Claude Code has a session cleanup mechanism. If you do not change the setting, conversation transcripts can be removed after a retention period that has commonly defaulted to 30 days.

Thirty days!

Not 30 days since you finished the project.

Not 30 days since you archived the conversation.

Not 30 days after a polite warning saying, “Hey, you still need this?”

Just old enough according to the cleanup policy.

And then: snip.

The particularly fun part

The code was fine.

GitHub was fine.

The repository was fine.

The commits were fine.

The documentation was fine.

What disappeared was the AI conversation transcript.

Which sounds harmless until you remember what actually lives in those conversations:

  • architectural reasoning
  • debugging discoveries
  • decisions you made three weeks ago
  • why you rejected Option B
  • production verification steps
  • weird edge cases
  • “do not ever touch this function again unless you want to summon demons”
  • 47 rounds of “that works, but now fix this other thing”

The code tells you what exists.

The conversation often tells you why it exists.

That is a very different artifact.

How I figured out what happened

I went looking in Claude’s local project storage under:

C:\Users\<you>\.claude\projects\

Claude Code stores session transcripts as .jsonl files.

In my case, the old transcript was gone.

The only transcript present was the brand-new session I had just created while investigating the problem.

Then I checked:

C:\Users\<you>\.claude\.last-cleanup

Its timestamp had been updated seconds after I reopened Claude Code.

That was a fairly strong clue.

My global Claude settings file was also:

{}

Meaning I had never explicitly changed the retention period.

There are multiple Claude Code issue reports describing the same behavior: old session transcripts getting cleaned up while other metadata can remain behind, leaving the UI aware that a session once existed but unable to actually open it.

A digital tombstone.

Can you recover the session?

Maybe.

Before declaring it dead, search for surviving .jsonl files.

On Windows PowerShell:

Get-ChildItem -Path "$env:USERPROFILE\.claude" -Filter "*.jsonl" -Recurse

If your old transcript still exists somewhere, you may be able to recover or resume it.

You can also inspect:

C:\Users\<you>\.claude\projects\

and look for folders corresponding to your project.

If the transcript is really gone, though, there may not be much to recover. Git preserves your code history. It does not preserve the entire conversation you had with Claude while creating it.

How to stop this from happening

Claude Code supports a setting called:

"cleanupPeriodDays"

The global settings file is typically:

C:\Users\<you>\.claude\settings.json

Mine was empty.

I changed it to:

{
  "cleanupPeriodDays": 3650
}

That gives me roughly ten years of retention, which should cover the remainder of this product, several career changes, and possibly the first EventSynced holographic tour manager.

You may see posts online suggesting:

"cleanupPeriodDays": 0

I would be cautious with that. There have been version-specific reports around how 0 is handled. A large positive value is boring, predictable, and boring is exactly what I want from data retention.

The larger lesson

AI coding tools are becoming part of the development environment, but their conversations are not necessarily durable project artifacts.

That is easy to forget.

When you spend weeks working with Claude, ChatGPT, Cursor, Copilot, or another assistant, the conversation starts to feel like part of the project.

But unless you deliberately preserve the important decisions somewhere else, it may just be temporary local state wearing a convincing mustache.

My new rule is simple:

Git stores the code.
Documentation stores the decisions.
AI conversations are useful working memory, not the only copy of institutional memory.

And apparently, check your retention settings before your AI decides it has become Marie Kondo.

One thing that saved me

I happen to use two AI systems while building.

Claude Code does most of the direct work in the repository.

Another AI product manager agent I created has been helping with product strategy, architecture decisions, feature sequencing, debugging context, UX decisions, and keeping track of the broader development story.

So when Claude lost its memory, I still had another reasonably complete record of where we were.

Accidentally, I had built AI redundancy.

That now feels less excessive and more like backups.

Because apparently in 2026, disaster recovery includes:

“Do any of the other robots remember what we were doing?”

Leave a Comment