Big Machine ·

Claude Code Session Weirdness

I was working with Jon Skeet a few days ago and I saw something quite strange. We did "Session 0" of the summer cohort where we extracted the knowledge in our brains and built out a set of skills, commands, etc. for Claude Code.

If you're interested in this kind of thing, I'll be doing this and more in the cohort, which is starting next week. As a group, we'll be digging in to skills, orchestration, personal tools (MCPs etc), local models, harnesses, and more. If you click this link, you'll get more info on it. I don't know if Jon can make it to the sessions, but I have invited him and hopefully he can pop in from time to time!

Anyway: this kind of thing happens a lot with Jon: he manages to find the edges of a thing, and then gleefully crash right through them.

In this case, he was trying to get Claude (Opus 4.8 I think) to help him out by suggesting fixes for a bug in his NodaTime project. It had to do with timezones and casing (I think), and the first time round he just vibed up an issue response and he was pretty impressed.

Jon is an "AI pragmatist" which is a polite way of saying he's "not a fan". Like so many, Jon questions what this will do to the skill of programming over time, and I think that's a grand question to ask.

Back to the weird part: when Jon used the free skill library I threw together (it's supposed to help people create "good", high-quality code), the answer got worse. Claude missed a few things, including testing for case-sensitivity, which was kind of core to the problem.

I have seen this before.

Claude Project Memory

After Jon was done with his vibe session, he deleted his changes manually, cleared the Claude session, and then added the skill library he downloaded from my site. He went through the process of tweaking the skills to his liking (using TDD, bug repro, etc) and then going through the /quick-fix process that was supposed to be more rigorous and produce higher quality results.

It didn't. Overall the tests where OK and the code it produced was fine, but in total, the vibe session produced better results. That wasn't supposed to happen.

And then it hit me: Claude remembers things for your project in the global .claude directory.

It looks like this:

Each of these directories corresponds to a "project" I have in VS Code. Inside these directories are GUID-y named subdirectories and session files with a JSONL extension.

If you look through these files, you'll see your session memory:

A session is the conversation history the SDK accumulates while your agent works. It contains your prompt, every tool call the agent made, every tool result, and every response. The SDK writes it to disk automatically so you can return to it later.

Now from what I understand, when you /clear (which we did), your context is cleared and everything should just be "fresh and new". But more than once I've had Claude go through previous sessions to gather context for the current one (I asked, it told me).

One time I started a new session because I was doing a run-through for a video and wanted to start from scratch in a new branch. I told it to create a task plan for me, and Claude said "is this for a new sprint, or are we redoing the old one? If redoing, what went wrong last time?"

That was weird.

Anyway: of course I don't know for sure why our second session would deteriorate like this, but I sure as heck want to find out!

Join Us!

Jon and I are going to do a lot more workshops like this as he's keen to dig in to the edges of AI, to find where they are, and to see if there's a bright end to all of this. I plan on recording each of these workshops, inviting the Core members to join us live for each one. I might also do single-shot admission like I did previously.

I'm still trying to figure out how this might work, so your suggestions are always welcome. The Core membership is my ongoing "Cohort+" kind of deal, where quarterly I run group sessions for all Core members. If you want to join the upcoming cohort, you will also have access to any workshops we do over the year, as well as follow up cohorts in the coming quarters.

The interesting thing with these live groups is (and Jon would love this): timezones. I know live events are difficult for folks in some areas of the world, so I'm toying with a version of the Core stuff where you get to watch the recordings only.

So: have you see anything weird with session memory and Claude Code like this? Let me know!

Cheers, Rob

Get these by email

Essays on code, business and the long way round.

No spam. Unsubscribe from any email, one click, and it only stops what you asked it to stop.