You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat history loss after PC restart, /resume recovers only 20-40% of context #23800
Chat history is being lost after PC/session restart. The /resume command fails to fully restore conversation context, recovering only approximately 20-40% of the original chat history. The agent loses all memory of previous conversations.
Timeline
First observed: ~2 weeks ago when latest channel reached version 2.1.29
Persisted through:latest versions 2.1.29 → 2.1.35
Now affects stable: Issue appeared on stable channel starting with version 2.1.25
Steps to Reproduce
Have an active conversation with significant context
Restart PC or terminal session
Use /resume to restore the previous conversation
Observe that 60-80% of the conversation context is missing
Expected Behavior
/resume should fully restore the conversation history and context.
Actual Behavior
Chat history is lost after restart
/resume only recovers 20-40% of the conversation
Agent has no memory of previous discussion topics
Environment
Claude Code version: 2.1.25 (stable)
OS: Ubuntu 25.10
Kernel: Linux 6.17.0-12-generic x86_64
Desktop: GNOME Shell 49.0 (Wayland)
Reacted by Darkwing4, Garrett Moss and Frédéric POTTIER
This bug is making Claude Code practically unusable for me. I can't take advantage of the new Claude Opus 4.5 model properly because every session restart loses most of the conversation context.
As a result, I'm forced to use Cursor Agent instead for any serious work that requires maintaining context across sessions.
2jfs904judsw20600jikn613d0dookl23jsig commented on Feb 7, 2026
+1 same exact issue. Cursor crashing (I use it only as IDE and have my CC sessions inside its integrated powershell) leaves me unable to resume conversations. I see the screen (tui) flash briefly with my conversation history but then goes back to the empty state. Pressing 'crtl + w' closes that powershell window and doesnt 'show all worktrees'
really bad issue for me as I have ongoing conversations with a lot of time spent on planning.
I tried manually adding the missing sessions to sessions-index.json with the correct structure (identical keys: sessionId, fullPath, fileMtime, firstPrompt, summary, messageCount, created, modified, gitBranch, projectPath, isSidechain). The entries were successfully added and the JSON file validates correctly (118 entries, all keys matching existing entries).
However, /resume still doesn't show the added sessions, even after restarting Claude Code in a new terminal. The file was not overwritten by Claude Code on restart (still shows our modifications with correct timestamp).
This suggests that either:
/resume does not read sessions-index.json directly (or uses it only as a cache that gets regenerated from another source)
There is an additional mechanism or secondary index that controls which sessions appear in the picker
The index file may be read only once at some initialization point and cached in memory differently
Possible investigation leads
The index file stopped being updated at a specific point in time — something may have caused writes to sessions-index.json to silently fail from that point on
I notice that at 2026-02-15 11:38, 4 sessions were created almost simultaneously — could be worth checking if concurrent index writes are properly handled
The 31 other missing sessions (118 on disk vs 87 in index) suggest this may have happened before as well, or that some session types are never indexed
Manually patching the index file does not restore visibility in /resume — the picker seems to rely on something else than (or in addition to) this file
Diagnostic scripts
Script 1 — Compare disk vs index (adapt <PROJECT> to your project path):
/resume has been broken for over a month. This makes Claude Code unusable for me. I had to build a workaround skill (“/resume-fix”) that searches the conversation history and exports it to Markdown, but it’s still inconvenient. I’m honestly surprised such a critical bug hasn’t been fixed yet. This was the first time in months I switched to other agents, and I ended up downgrading my Claude Code subscription because of it.
Title: Resuming migrated sessions fails due to thinking/redacted_thinking block validation
Problem: After migrating ~/.claude to a new machine, resuming an existing session fails with API 400 errors:
messages.X.content.0.thinking: each thinking block must contain non-whitespace thinking
Invalid 'signature' in 'thinking' block
Invalid 'data' in 'redacted_thinking' block
Root cause: The API validates signatures on thinking/redacted_thinking blocks, but these become invalid after migration. There's no graceful fallback — the entire session is unresumable.
Workaround: Manually strip all thinking and redacted_thinking blocks from the session JSONL file.
Expected behavior: Claude Code should handle this gracefully — either by stripping invalid thinking blocks automatically when replaying a session, or by not sending them to the API at all (since they're not needed for conversation continuity).
Environment: Claude Code on Linux, session migrated between machines (copied .claude/ and .claude.json*) - maybe have some official docs about how to do it properly ?
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
Darkwing4 commentedon Feb 6, 2026
My colleague is experiencing the same issue on Windows with version 2.1.34
github-actions commentedon Feb 6, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Darkwing4 commentedon Feb 6, 2026
Same issue as #22107
This bug is making Claude Code practically unusable for me. I can't take advantage of the new Claude Opus 4.5 model properly because every session restart loses most of the conversation context.
As a result, I'm forced to use Cursor Agent instead for any serious work that requires maintaining context across sessions.
2jfs904judsw20600jikn613d0dookl23jsig commentedon Feb 7, 2026
+1 same exact issue. Cursor crashing (I use it only as IDE and have my CC sessions inside its integrated powershell) leaves me unable to resume conversations. I see the screen (tui) flash briefly with my conversation history but then goes back to the empty state. Pressing 'crtl + w' closes that powershell window and doesnt 'show all worktrees'
really bad issue for me as I have ongoing conversations with a lot of time spent on planning.
fredpottier commentedon Feb 16, 2026
Additional data:
sessions-index.jsonstops being updatedEnvironment:
Observation
I noticed that
/resumecouldn't find my recent sessions. I compared sessions on disk vs sessions registered in the index and found a discrepancy:Facts
sessions-index.jsonwas last modified on Feb 15 at 13:08/resumedespite being fully intact on disk9546067c, 20MB) represents several hours of workAdditional finding: manually adding entries doesn't fix
/resumeI tried manually adding the missing sessions to
sessions-index.jsonwith the correct structure (identical keys:sessionId,fullPath,fileMtime,firstPrompt,summary,messageCount,created,modified,gitBranch,projectPath,isSidechain). The entries were successfully added and the JSON file validates correctly (118 entries, all keys matching existing entries).However,
/resumestill doesn't show the added sessions, even after restarting Claude Code in a new terminal. The file was not overwritten by Claude Code on restart (still shows our modifications with correct timestamp).This suggests that either:
/resumedoes not readsessions-index.jsondirectly (or uses it only as a cache that gets regenerated from another source)Possible investigation leads
sessions-index.jsonto silently fail from that point on2026-02-15 11:38, 4 sessions were created almost simultaneously — could be worth checking if concurrent index writes are properly handled/resume— the picker seems to rely on something else than (or in addition to) this fileDiagnostic scripts
Script 1 — Compare disk vs index (adapt
<PROJECT>to your project path):Script 2 — Add missing sessions to index (attempted fix, did not restore
/resumevisibility):Darkwing4 commentedon Feb 16, 2026
/resume has been broken for over a month. This makes Claude Code unusable for me. I had to build a workaround skill (“/resume-fix”) that searches the conversation history and exports it to Markdown, but it’s still inconvenient. I’m honestly surprised such a critical bug hasn’t been fixed yet. This was the first time in months I switched to other agents, and I ended up downgrading my Claude Code subscription because of it.
Lennie commentedon Feb 25, 2026
I had a similar problem:
Title: Resuming migrated sessions fails due to thinking/redacted_thinking block validation
Problem: After migrating ~/.claude to a new machine, resuming an existing session fails with API 400 errors:
messages.X.content.0.thinking: each thinking block must contain non-whitespace thinking
Invalid 'signature' in 'thinking' block
Invalid 'data' in 'redacted_thinking' block
Root cause: The API validates signatures on thinking/redacted_thinking blocks, but these become invalid after migration. There's no graceful fallback — the entire session is unresumable.
Workaround: Manually strip all thinking and redacted_thinking blocks from the session JSONL file.
Expected behavior: Claude Code should handle this gracefully — either by stripping invalid thinking blocks automatically when replaying a session, or by not sending them to the API at all (since they're not needed for conversation continuity).
Environment: Claude Code on Linux, session migrated between machines (copied .claude/ and .claude.json*) - maybe have some official docs about how to do it properly ?
github-actions commentedon Mar 25, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Apr 2, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.