r/perchance • • 5d ago

AI Beware the scratch folder

If you’re using the AI Helper, you should be aware that it prefers to put all working notes, designs, planned future work, etc., in scratch/. According to the AI Helper, it does this because src/ is publicly accessible. The rationale is two-fold: 1) everything in src/ should be something necessary for the generator to function or something that would be helpful to a user, and 2) there are files used during development that you might not want users to see.

This is all well and good, but the problem is that scratch/ is guaranteed to get wiped. Furthermore if you open the same generator in a different tab, browser or machine, you likely won’t get the same scratch/ folder.

So, the AI Helper is programmed to put important files in a place that is guaranteed to get wiped. Your test automation? Guaranteed to get wiped. Your design documents? Guaranteed to get wiped. The scratch folder is also not present in backups, which is a harsh double whammy.

Now, in practice, I’ve seen the /scratch folder persist for MONTHS. However, a server problem can definitely wipe it out. This is what happened to me, and it’s one of the many reasons I stopped using the AI Helper.

To be clear, I do like the helper a lot. It has a lot of value. You just have to understand what it’s good at and what it’s bad at. The bad, in this case, is that it not only doesn’t have revision history, it is guaranteed to lose important documents that you ask it to maintain.

To solve this problem, rather than pollute src/, I use git locally for revision control. This is extremely helpful when tracking down when a bug got introduced, or why you made a change. The only problem is that perchance.org is not designed to interact with source control tools. And copying lots of files by hand from scratch or src is tedious at best. I wrote zip helpers, but that only works for download. You can get the ai helper to ingest a zip you drag into the helper conversation, but it’s still an ugly workflow.

The best solution, ironically, is to use a different AI to handle ferrying versions. And if you’re using an AI to do that, it’s very likely more capable than the AI Helper at maintaining your generator. Which is where I ended up, after losing months of work. I didn’t realize the AI was storing important data in scratch and I didn’t realize it could get wiped, not that it wasn’t backed up. It was, for me, the last straw in a very long list. Sure, I pay for Claude now, but making generators is a hobby for many of us and Claude is a cheap price to pay for entertainment.

Word of warning though: perchance.org doesn’t play nice with most AI harness integrated browsers. Also, the AI helper comes with a lot of bespoke skills that give it a leg up on external AI. It has access to features that external AI cannot use. So it’s not a slam dunk to switch to an external AI.

Just make sure you back up scratch, or instruct the helper not to put anything there you don’t want to lose.

7 Upvotes

13 comments sorted by

4

u/TheLittleFoxX87 5d ago

Brother, the scratch folder just saves on the current browser. It's local.

1

u/Glittering-Move-220 5d ago

Do you have any idea where to find it (Windows Chrome) after the AI Helper can’t find it anymore? From what I’ve read, that folder can get cleaned up by the browser at any time. For me it disappeared after server connection errors, so I’m hoping the data is still on my pc somewhere and it’s just a matter of the AI Helper getting assigned a new id or something… so it can’t look it up properly?

2

u/TheLittleFoxX87 4d ago

Brother, are you for real?

I thought you knew the location for the scratch folder. Here, I got you.

Click Edit (AI Helper Editor) -> Files -> click on SRC and select SCRATCH.

Boom. Copy all those files as a backup.

1

u/Glittering-Move-220 4d ago

No, the location on disk. I figured it out

3

u/Rough_Bird_489 5d ago

You don't have to do all of that just go click the settings emoji, click draft then pin the conversation with your ai then it would be permanently stays there until you unpin it.

2

u/Glittering-Move-220 5d ago

Are you sure that prevents the scratch folder from being deleted? How do you know? Is that documented somewhere?

2

u/Rough_Bird_489 5d ago

Because I did the exact same thing, my scratch file is there and it's 3 months old and the ai scratch almost about to reach 500 files. Just don't unpin it and you will see the consequences of unpinning.

2

u/Glittering-Move-220 5d ago

I had Claude look into this. It found the folders %LOCALAPPDATA%/Google/Chrome/User Data/Default/File System/044/t, which is in my case where the scratch data lives, and confirmed that this generator’s scratch folder had been deleted during compaction / cleanup 😞

2

u/Glittering-Move-220 4d ago edited 4d ago

Update! I found it! Or rather, Claude found it in a folder with a guid for a name. It didn’t get wiped, the AI Helper pane just couldn’t find it anymore. Not only did Claude help me find it, it restored it for me so that now the AI helper can see it. 🎉

2

u/Glittering-Move-220 4d ago

(Still sticking with Claude though. He’s my ride or die now for saving months of work)

1

u/thevegit0 5d ago

i always ask it to save in .md things to plan, it usually tells me it uses the scratch stuff. hmm i just noticed my scratch has a lot of stuff, surely it must be localstorage since is 'private' stuff

1

u/Glittering-Move-220 5d ago

I assume so too. I just don’t know how to find it now that the AI helper can’t. 😩

1

u/Mysterious-Ball4211 5d ago

I use TOR so it always gets wiped out every session