Skip to content

Some historical sessions disappeared in Codex

Quick fix

Increase Claude Code's cleanupPeriodDays and use claude --resume to check whether .jsonl sessions remain on disk.

Error output
发现历史是被备份的,但是我现在重新打开,有些还是不见了,按照说明应该是不会把之前的历史回复吗?
English translation

I found that the history was backed up, but after reopening it now, some sessions are still missing. According to the documentation, shouldn't previous history be retained?

The maintainer found that cc-switch does not write to or delete `~/.claude/projects`. This usually results from Claude Code's default 30-day automatic cleanup (`cleanupPeriodDays: 30`), or from the client filtering its session view by the current endpoint or account.

The report listed Codex as the affected app, but the maintainer's troubleshooting and recovery advice applied to Claude Code; the original post provided no evidence that Codex historical sessions were deleted. The issue was closed, but the reply only stated the findings and included no later confirmation from the user.

  1. Increase `cleanupPeriodDays` and put it in the cc-switch shared configuration to prevent it from being overwritten when switching.

  2. Run `claude --resume` and check whether the `.jsonl` sessions still exist on disk.

ToolCodex
VersionUnknown
PlatformsUnknown

This page is distilled from 1 real issues

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.