p.enthalabs

Beware, Claude Code deletes >30 day old transcripts. Anthropic won't fix it

github.com · Read Story HN original

Comments

The best mitigation I've found against this is training Claude to collate what it does within the project dir, specifically a CLAUDE.md vision file and .claude/changelog that documents the changes it makes. The biggest pain point though is remembering to force it to do that between sessions (man is that contextual memory unreliable sometimes).
Oh yeah - it commonly doesn't update my BACKLOG.md after shipping something. It tends to catch itself on the next set of work, but sometimes I have it clean up based on recent commits.
Have you tried using hooks? I have a similar changelog except I write it to a SQLite database for searchability across all my sessions. I use the Stop/StopFailure hooks and it reliably writes to the change log. I used to just use CLAUDE.md instructions for this, but as you've experienced it's not completely reliable.

https://code.claude.com/docs/en/hooks

thank you! That looks really interesting, I'll try it out.
That Claude can't retain and reference these in the future, SQLite could do this trivially, is wild.
Who said "can't"?
idk if it's broken.

I think it's more like, "We don't want our harness to need to be able to interpret every version of our conversation format indefinitely."

i think more of a "we need to delete thinking traces off of customers devices, so our customers cant use them"

which makes anthropic on the whole a lot less trustworthy to have access to any machine

Except that those customers can access the traces for 30 days, and freely copy them at any point during that period? It's a usability issue at worst, not some anti-customer conspiracy.
It's both a usability issue and an anti-customer choice.
Sure, and if they hadn't trimmed logs someone would also be complaining that "stupid Anthropic lets logs fill your hard drive"!

Oh wait, they just complained about Codex doing this a day or so ago.

Isn’t “Anthropic won’t fix it” a little sensational for barely month old issue with little activity(two upvotes, one of which is me), in backlog of 5k+? Agree that it’s a real issue that need fixing however
"fix it" here is reverting their bad change
I just noticed that it’s a config option. Weird that it’s so short though, I can understand why it may be needed for users who spawn hundreds of sessions a day
They claim that they can automate development, so their backlog should really be ~0. /hj

  Isn’t “Anthropic won’t fix it” a little sensational 
It's editorializing and against HN guidelines either way.
There's around a dozen issues about this, the oldest one is from a bit under a year ago (though the author marked it closed... prematurely I'd say):

https://github.com/anthropics/claude-code/issues/4172

or this one from December, still open:

https://github.com/anthropics/claude-code/issues/9258

Some more fun facts about this:

- it is silent, not announced anywhere, and calls rm on your data

- setting the days to zero doesn't disable it, it immediately rm's ALL your chats

- even setting it to _something_ big doesn't prevent data loss if you launch Claude Code in some modalities (certain subagents, etc) that don't load this config key but perform deletion anyway (with the 30 day default)

So it's a config setting you can change? What would you expect them to fix, that sounds like a feature?
Well they want the default to change. But yeah, it’s not really a bug.
It says that raising the config setting still causes things to be inappropriately deleted.
There's nothing in claude code onboarding that tells you about this config setting. So most people don't discover it until it's bitten them.
Some CLI startup paths don't load the config, use the 30 day default. Boom, your chats are gone.

Imagine taking a leave, come back in 30 days, boom. Your transcripts are rm'd, silently, without any notification or confirmations.

Bonus: setting it to 0 days rms everything immediately

It's on your computer you can literally just make a crontab to copy them somewhere else.
Or tell claude to do it /s
/s not needed, it's the easiest path
Wow good timing, I’ve been working on a session hub of sorts for devs. Check it out, you can store your sessions on here. https://joe-store-frontend.onrender.com
"Why this is more than an inconvenience. For paying users who treat their sessions as intellectual property — design reasoning, prompt history, hard-won context — this is silent, unconsented destruction of user-owned data. The transcripts are the user's record of their own thinking and work; deleting them by default, silently, with no recovery, inverts the expected ownership relationship. A 30-day default that quietly discards months of accumulated reasoning is a poor default for that audience, however reasonable it is for disk hygiene in the general case."

Those users would be wise to back those files up if they consider them valuable intellectual property. If they're important enough that you'd miss them after a disk failure, then they should have been being backed up already.

>if they consider them valuable intellectual property [...]

It's hard to take any of what's written seriously, given that it's all AI generated. Did the user actually lose "valuable intellectual property", or did they tell claude to write as dire of a justification as possible?

I got bitten by this. I sometimes check past sessions for "prompt I used to do X". I consider the LLM output to be mine as well, as it's something I paid for. Nothing should be deleted without my knowledge and approval.
There are several third party tools which can assist with transparently aggregating and archiving sessions across projects

Ccrider is the one I use: https://github.com/neilberkman/ccrider

Session backups live outside of ~.claude so are not deleted and can be resumed.

ha ha brilliant name!
I thought this was a feature that they tidied up your data
This is clearly shown in the settings/config (or at least was last time I looked), if people are surprised by this I recommend asking claude code what settings you can tweak
Why ask for what settings you can tweak? It's supposed to be the case that the defaults are good for many, and then when something needs tweaking you ask about it at that point. And still though this 30 day limit might be good for many, it's actually pretty bad overall because it leads to irreversible loss for those who it isn't good.
"Evil Anthropic implements rolling log files."

Film at 11.

Probably a better practice to devise your own record/docs history to rely on rather than depending on Anthropic.
This literally hit me just last night. Went to continue a project I haven't touched in a while and couldn't find the session, which I wanted to continue from as it's a cheap way to track token cost at the project level. Many missing sessions, then Claude told me what was up and I had it configure retention for 10,000 years.
raw transcripts can expire, but decisions shouldn’t. i’d rather keep durable project facts separately than depend on old chat logs.