Claude Code hides its history: 715 sessions found on disk, only 69 visible in the interface

It turns out Claude Code stores far more history than its sidebar shows. The author found 48 MB of data and 715 sessions on disk, while the interface listed only 69. The missing chats aren't gone. They sit locally and can be read with cat, grep or Python. The real problem is elsewhere: the internal structure changes, so any migration tooling quickly goes out of date.

AI-processed from Habr AI; edited by Hamidun News
Claude Code hides its history: 715 sessions found on disk, only 69 visible in the interface
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1look for the local directories that hold history, not just the list in the sidebar
Key metric #2export important sessions to text or a separate archive
Key metric #3index chats with grep, Python or your own script

The author of a teardown of Claude Code's internals showed that the app stores much more history than the user can see. On one computer, 48 MB of local data and 715 sessions turned up on disk, while the interface displayed only 69.

Where the history lives

The trigger for the investigation was a very practical problem: the author has several Claude Code accounts, because Anthropic limits usage on a weekly basis. When one account hits its limit, she has to switch to another. After the switch, the app's sidebar rebuilds itself, and older work threads seem to vanish. These weren't small requests but two-day sessions, with color-grading debugging, generations from reference boards and dozens of steps that are hard to reconstruct from memory later.

A search of the disk showed the data hadn't gone anywhere. The history was spread across six folders and took up tens of megabytes. In other words, Claude Code effectively keeps a local archive of your work, but the interface shows only a fragment of it. For people who use the tool as a working environment, this distinction matters: what looks lost is not the session itself, but access to it through the app.

"In the app window I can see 69 sessions out of 715."

Why the interface loses chats

The key observation is that the session list in the app is not a complete log but a filtered view. After an account or context switch, the interface rebuilds the sidebar from scratch and pulls in only part of the local history. The remaining files are still on disk and can be read with ordinary tools such as cat, grep or Python, but inside Claude Code itself they become invisible. The user sees emptiness where, at the file-system level, nothing has gone missing.

This explains why the problem hits power users especially hard: they run many parallel tasks, work in long series and switch accounts more often because of Anthropic's limits. If the interface doesn't show every trace of past work, people get the false impression that the context is lost entirely. In reality, what gets lost is not the content but the index by which the app decides what deserves to be shown in the current window.

Why migration is fragile

Another conclusion follows from this finding: history can be recovered or indexed, but you shouldn't count on a permanent, universal script. As long as the data sits in local folders, it's realistic to export it, search it and assemble it into your own archive. But any such tool relies on Claude Code's current internal layout, which may change after a client update, a change of storage schema or a change in display logic.

  • look for the local directories that hold history, not just the list in the sidebar
  • export important sessions to text or a separate archive
  • index chats with grep, Python or your own script
  • don't treat the Claude Code interface as the only source of truth

That is the practical value of the teardown. The author doesn't show a trick for one specific folder but a more general principle: AI tools can have a noticeable gap between what is stored locally and what is visible in the UI. So account migration, backups and search across old conversations are better built as an external process. Otherwise, after the next update, you'll have to work out all over again where your own working memory now lives.

What this means

For active Claude Code users, the news is unpleasant but useful: old sessions most often don't disappear; the app simply can't reliably show them or carry them between contexts. For the market, it's one more signal that AI IDEs and agentic tools have become working infrastructure, which means they need proper export, search, backup and history portability, not as a hack but as a basic feature.

Story

Key Questions Answered

Where the history lives?

The trigger for the investigation was a very practical problem: the author has several Claude Code accounts, because Anthropic limits usage on a weekly basis. When one account hits its limit, she has to switch to another. After the switch, the app's sidebar rebuilds itself, and older work threads seem to vanish. These weren't small requests but two-day sessions, with color-grading debugging, generations from reference boards and dozens of steps that are hard to reconstruct from memory later. A search of the disk showed the data hadn't gone anywhere. The history was spread a

Why the interface loses chats?

The key observation is that the session list in the app is not a complete log but a filtered view. After an account or context switch, the interface rebuilds the sidebar from scratch and pulls in only part of the local history. The remaining files are still on disk and can be read with ordinary tools such as cat, grep or Python, but inside Claude Code itself they become invisible. The user sees emptiness where, at the file-system level, nothing has gone missing. This explains why the problem hits power users especially hard: they run many parallel tasks, work in long series

Why migration is fragile?

Another conclusion follows from this finding: history can be recovered or indexed, but you shouldn't count on a permanent, universal script. As long as the data sits in local folders, it's realistic to export it, search it and assemble it into your own archive. But any such tool relies on Claude Code's current internal layout, which may change after a client update, a change of storage schema or a change in display logic. look for the local directories that hold history, not just the list in the sidebar export important sessions to text or a separate archive index chats wit

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…