Hacker News new | past | comments | ask | show | jobs | submit login

Neat, thanks, I had no idea!

Edit: It so happens I had a Claude Code session open in my Terminal, so I asked it:

    Save your current context to a file.
Claude produced a 91 line md file... surely that's not the whole of its context? This was a reasonably lengthy conversation in which the AI implemented a new feature.



What is in the file?


An overview of the project and the features implemented.

Edit: Here's the actual file if you want to see it. https://gist.github.com/Wowfunhappy/e7e178136c47c2589cfa7e5a...


Apologies for the late reply. My kids demanded my attention yesterday.

It doesn't seem to have included any points on style or workflow in the context. Most of my context documents end up including the following information:

1. I want the agent to treat git commits as checkpoints so that we can revert really silly changes it makes.

2. I want it to keep on running build/tests on the code to be sure it isn't just going completely off the rails.

3. I want it to refrain from adding low signal comments to the code. And not use emojis.

4. I want it to be honest in its dealings with me.

It goes on a bit from there. I suspect the reason that the models end up including that information in the context documents they dump in our sessions is that I give them such strong (and strongly worded) feedback on these topics.

As an alternative, I wonder what would happen if you just told it what was missing from the context and asked it to re-dump the context to file.


But none of this is really Claude Code's internal context, right? It's a summary. I could see using it as an alternative to /compact but not to undo a /clear.

Whatever the internal state is of Claude Code, it's lost as soon as you /clear or close the Terminal window. You can't even experiment with a different prompt and then--if you don't like the prompt--go back to the original conversation, because pressing esc to branch the conversation looses the original branch.


Yes, this is true. It's a summary, and cannot really undo a /clear. It is just a directed, cheaper /compact.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: