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
[BUG] Did 2.1.1 delete all of your *local* chat logs > 30 days old without asking? #16978
I have searched existing issues and this hasn't been reported yet
This is a single bug report (please file separate reports for different bugs)
I am using the latest version of Claude Code
What's Wrong?
I had (and regularly reference) 4+ months of chat logs (.jsonl) under ~/.claude/projects/; just now, after starting a new session, everything before December 4th has been deleted. I have explicitly configured cleanupPeriodDays to 99999:
Did Anthropic unilaterally decide that until I opt-into data sharing, that they'd bulk delete files from my local machine? Because I'm pretty sure that's what just happened.
Here's the prompt I was presented in the new session:
All of my history was deleted and I haven't even selected a choice yet.
Is this intentional behavior? Does the latest release of Claude Code preemptively delete our local chat logs without authorization?
What Should Happen?
Claude Code should not delete chat logs fresher than cleanupPeriodDays.
There are two issues going on in this report that could be happening independently.
Why your chat logs > 30 days got deleted
It's possible that the new version detected your settings file containing cleanupPeriodDays as invalid. You should use claude doctor to see why. Version 2.1.0/2.1.1 introduced potentially stricter validation. The current behavior for invalid settings (which I would say is not ideal) is to use the default setting (30 days) when the file gets invalidated.
CC fix: Skip cleanup if cleanupPeriodDays is mentioned in an invalid settings file. The change is under review.
Why the Consumer Terms modal shows up
Consumer terms acceptance are tracked server-side. Version 2.1.1 introduced timeouts for server requests that could lead to silent failures.
CC fix: I have reverted the timeouts that were introduced, will come out in the next release.
Unfortunately, there isn't a way to recover the history apart from any backups you maintain of the transcript files.
My best guess, then, is that the described fallback behavior triggered as a result of the settings filewatcher (TIL that was a thing) firing while I was mid-way through modifying my ~/.claude/settings.json file to disable autoupdates during the botched 2.1.x rollout.
To the very best of my knowledge and recollection, I did not start a new CC session/tty while the file was in a transient state. So I believe that implies one of two things:
I'm wrong and I did start a new CC session while my ~/.claude/settings.json file was in a malformed state.
Modifying ~/.claude/settings.json while a CC session is running can trigger cleanup to run.
Iff the latter, then CC is breaking the contract promised by cleanupPeriodDays to only run at startup. And that's extremely dangerous.
I always start CC with the --debug flag and here's what I see:
Details
2026-01-07T21:04:37.732Z [DEBUG] Checking for native installer update to version 2.0.76
2026-01-07T21:04:37.733Z [DEBUG] Already running version 2.0.76 - no update needed
2026-01-07T21:34:37.731Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-07T21:34:37.739Z [DEBUG] Downloading native installer version 2.1.1
2026-01-07T21:34:41.264Z [DEBUG] Atomically installed binary to /Users/kyle/.local/share/claude/versions/2.1.1
2026-01-07T21:34:41.270Z [DEBUG] Atomically updated symlink /Users/kyle/.local/bin/claude -> /Users/kyle/.local/share/claude/versions/2.1.1
2026-01-07T21:34:41.276Z [DEBUG] Successfully updated to version 2.1.1
2026-01-07T21:34:41.667Z [DEBUG] CDN dark read succeeded for 2.1.1
2026-01-07T22:04:37.767Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-07T22:04:37.769Z [DEBUG] Version 2.1.1 already installed, updating symlink
2026-01-07T22:04:37.769Z [DEBUG] Successfully updated to version 2.1.1
2026-01-07T22:34:37.779Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-07T22:34:37.787Z [DEBUG] Version 2.1.1 already installed, updating symlink
2026-01-07T22:34:37.789Z [DEBUG] Successfully updated to version 2.1.1
2026-01-07T23:04:37.729Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-07T23:04:37.739Z [DEBUG] Version 2.1.1 already installed, updating symlink
2026-01-07T23:04:37.742Z [DEBUG] Successfully updated to version 2.1.1
2026-01-07T23:34:37.703Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-07T23:34:44.717Z [ERROR] Error: Error: NON-FATAL: Lock acquisition failed for /Users/kyle/.local/share/claude/versions/2.1.1 (expected in multi-process scenarios)
at XZR (/$bunfs/root/claude:2430:2165)
at GEB (/$bunfs/root/claude:2428:8637)
at async R_1 (/$bunfs/root/claude:2428:11835)
at async wx (/$bunfs/root/claude:2430:236)
at async <anonymous> (/$bunfs/root/claude:2430:14362)
at processTicksAndRejections (native:7:39)
2026-01-08T00:04:37.647Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-08T00:04:44.658Z [ERROR] Error: Error: NON-FATAL: Lock acquisition failed for /Users/kyle/.local/share/claude/versions/2.1.1 (expected in multi-process scenarios)
at XZR (/$bunfs/root/claude:2430:2165)
at GEB (/$bunfs/root/claude:2428:8637)
at async R_1 (/$bunfs/root/claude:2428:11835)
at async wx (/$bunfs/root/claude:2430:236)
at async <anonymous> (/$bunfs/root/claude:2430:14362)
at processTicksAndRejections (native:7:39)
2026-01-08T00:34:37.662Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-08T00:34:44.674Z [ERROR] Error: Error: NON-FATAL: Lock acquisition failed for /Users/kyle/.local/share/claude/versions/2.1.1 (expected in multi-process scenarios)
at XZR (/$bunfs/root/claude:2430:2165)
at GEB (/$bunfs/root/claude:2428:8637)
at async R_1 (/$bunfs/root/claude:2428:11835)
at async wx (/$bunfs/root/claude:2430:236)
at async <anonymous> (/$bunfs/root/claude:2430:14362)
at processTicksAndRejections (native:7:39)
2026-01-08T01:04:37.725Z [DEBUG] Checking for native installer update to version 2.1.1
2026-01-08T01:04:44.737Z [ERROR] Error: Error: NON-FATAL: Lock acquisition failed for /Users/kyle/.local/share/claude/versions/2.1.1 (expected in multi-process scenarios)
at XZR (/$bunfs/root/claude:2430:2165)
at GEB (/$bunfs/root/claude:2428:8637)
at async R_1 (/$bunfs/root/claude:2428:11835)
at async wx (/$bunfs/root/claude:2430:236)
at async <anonymous> (/$bunfs/root/claude:2430:14362)
at processTicksAndRejections (native:7:39)
2026-01-08T01:05:31.092Z [DEBUG] Detected deletion of /Users/kyle/.claude/settings.json
2026-01-08T01:05:31.101Z [DEBUG] Settings changed from userSettings, updating AppState
2026-01-08T01:06:10.190Z [DEBUG] Detected change to /Users/kyle/.claude/settings.json
2026-01-08T01:06:10.197Z [DEBUG] Settings changed from userSettings, updating AppState
2026-01-08T02:22:58.935Z [DEBUG] AutoUpdaterWrapper: Installation type: native
At no point did I delete my ~/.claude/settings.json; I'll defer speculating about why that message might have fired for now.
Obviously we can't get back what's lost, so I'll try and wrap this with some constructive feedback: permanent customer data loss isn't an acceptable default.
I just opened a VS Code project I have been working on for the past few months and saw that the conversation history was empty.
I checked on the terminal and not only the conversation history of this project, but all the other projects' conversations I had were deleted. Yesterday they were all there. The same thing happened to one of my co-workers.
I did not set any cleanupPeriodDays (running jq '.cleanupPeriodDays' ~/.claude/settings.json returns null). I also did not manually update Claude. I wasn't prompted for any "data sharing" or anything else. All chats simply dissapeared without any warning or prompt.
I tried recovering previous conversations from ~/.claude but there are only log files from today, everything previous to today has been permanently deleted.
This is a serious issue, if at any point I can lose all chats without warning I will seriously reconsider my Claude subscription.
changed the title [-][BUG] Did `2.1.1` delete all of your *local* chat logs > 30 days without asking?[/-][+][BUG] Did `2.1.1` delete all of your *local* chat logs > 30 days old without asking?[/+]on Jan 21, 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.
Activity
knksmith57 commentedon Jan 9, 2026
x-referencing #16970 (comment)
github-actions commentedon Jan 9, 2026
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
knksmith57 commentedon Jan 9, 2026
x-referencing evidence that this contradicts the documented behavior and contract promised by the official docs: #4172 (comment)
See https://code.claude.com/docs/en/settings#available-settings
dicksontsai commentedon Jan 9, 2026
There are two issues going on in this report that could be happening independently.
Why your chat logs > 30 days got deleted
It's possible that the new version detected your settings file containing
cleanupPeriodDaysas invalid. You should useclaude doctorto see why. Version 2.1.0/2.1.1 introduced potentially stricter validation. The current behavior for invalid settings (which I would say is not ideal) is to use the default setting (30 days) when the file gets invalidated.cleanupPeriodDaysis mentioned in an invalid settings file. The change is under review.Why the Consumer Terms modal shows up
Consumer terms acceptance are tracked server-side. Version 2.1.1 introduced timeouts for server requests that could lead to silent failures.
Unfortunately, there isn't a way to recover the history apart from any backups you maintain of the transcript files.
knksmith57 commentedon Jan 9, 2026
Appreciate the context, @dicksontsai.
My best guess, then, is that the described fallback behavior triggered as a result of the settings filewatcher (TIL that was a thing) firing while I was mid-way through modifying my
~/.claude/settings.jsonfile to disable autoupdates during the botched2.1.xrollout.To the very best of my knowledge and recollection, I did not start a new CC session/tty while the file was in a transient state. So I believe that implies one of two things:
~/.claude/settings.jsonfile was in a malformed state.~/.claude/settings.jsonwhile a CC session is running can trigger cleanup to run.Iff the latter, then CC is breaking the contract promised by
cleanupPeriodDaysto only run at startup. And that's extremely dangerous.I always start CC with the
--debugflag and here's what I see:Details
At no point did I delete my
~/.claude/settings.json; I'll defer speculating about why that message might have fired for now.Obviously we can't get back what's lost, so I'll try and wrap this with some constructive feedback: permanent customer data loss isn't an acceptable default.
MarcosRodrigoT commentedon Jan 19, 2026
I just opened a VS Code project I have been working on for the past few months and saw that the conversation history was empty.
I checked on the terminal and not only the conversation history of this project, but all the other projects' conversations I had were deleted. Yesterday they were all there. The same thing happened to one of my co-workers.
I did not set any
cleanupPeriodDays(runningjq '.cleanupPeriodDays' ~/.claude/settings.jsonreturnsnull). I also did not manually update Claude. I wasn't prompted for any "data sharing" or anything else. All chats simply dissapeared without any warning or prompt.I tried recovering previous conversations from
~/.claudebut there are only log files from today, everything previous to today has been permanently deleted.This is a serious issue, if at any point I can lose all chats without warning I will seriously reconsider my Claude subscription.
[-][BUG] Did `2.1.1` delete all of your *local* chat logs > 30 days without asking?[/-][+][BUG] Did `2.1.1` delete all of your *local* chat logs > 30 days old without asking?[/+]github-actions commentedon Feb 28, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Mar 9, 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.