yazzy

Plain ol' reading

Don't let Claude Code delete your session logs

Simon Willison ・ simonwillison.net

Claude Code stores full logs of your sessions as newline-delimited JSON in ~/.claude/projects/encoded-directory/*.jsonl on your machine. I currently have 379MB of these!

Here's an example jsonl file which I extracted from my Deepseek-OCR on NVIDIA Spark project. I have a little vibe-coded tool for converting those into Markdown which produces results like this.

Unfortunately Claude Code has a nasty default behavior of deleting these after 30 days! You can't disable this entirely, but you can at least delay it for 274 years by adding this to your ~/.claude/settings.json file:

{
  "cleanupPeriodDays": 99999
}

Claude Code's settings are documented here.

Posted 22nd October 2025 at 12:45 am

Recent articles