Werkzeugkasten · 13 November 2026 · 1 min

Why I keep every AI agent session

Claude Code and Gemini CLI delete your sessions after 30 days by default. I wrote down what gets lost, and the settings and backups that keep it.

I wrote this article because of a moment many developers know. You spend an afternoon with an agent on a nasty bug. Weeks later a similar bug shows up, you remember that the answer was in that session, and the session is gone.

Your memory is fine. The tool deleted it on schedule. Claude Code removes transcripts after 30 days by default, and Gemini CLI does the same. It is in the docs, but few people read that part.

Git records what changed. It rarely records why. The why is in the session: the decisions and their reasons, the theories that were wrong, the exact command that worked, the file and line the agent found. Lose the session, and the next agent tries the same dead ends again, on your tokens.

The one idea to take away: treat your session history as a knowledge base, and protect it like one. Change the retention setting today, and put the session files in your backup.

The article has a table with the defaults of six agent CLIs, the setting to change in Claude Code and Gemini CLI, how to back up the raw files, and how to search them before you ask an agent the same question again.

Read the full article on splitkick.app →