Keeping a session log in Claude Code: what worked for me (open to suggestions)
For anyone who has Claude read a log at the start of a session and update it at the end, or is thinking about it: it's a good idea. I use Claude Code, and here's what I added after it bit me.
Save as you go, not just at the end. Sessions end early. The moment something is decided or corrected, it goes in the file.
Keep "where things stand" separate from "what happened." One short, current file Claude reads every time. One dated history it opens only when needed. One of my project files hit almost 1,500 lines before I split it.
Start fresh more often than feels natural. A long chat rereads everything with every message, so usage keeps growing. I once hit 76% of my weekly limit by Wednesday, and my worst chat had accidentally been open for over 37 hours. With a good log, a fresh start costs almost nothing.
To set this up, open Claude Code in your project folder and paste this:
Set up session logging in this folder. Do all of it yourself, and don't ask me to create anything.
1. Look at what's here first. Never overwrite or delete an existing file. If CLAUDE.md, CONTEXT.md, or LOG.md already exists, add to it.
2. If CONTEXT.md is missing, create it. Keep it under 30 lines, with these sections: Goal, Where things stand, Decisions and corrections, Next step. Fill in what you can tell from this folder and mark anything uncertain "(guess)".
3. If LOG.md is missing, create it for dated history, newest first. If an existing file has old dated entries that belong in LOG.md, show me what you'd move and wait for my yes before moving anything.
4. Add this section to CLAUDE.md, creating the file if needed:
## Session rules
- At the start of each session, read CONTEXT.md and tell me in two lines where we left off and what's next.
- Save as you go. The moment we decide something, or I correct you, update CONTEXT.md. Don't wait for the end of the session.
- CONTEXT.md holds current state only and stays under 30 lines. Move older detail to LOG.md with the date.
- Don't open LOG.md unless I ask or the task needs history.
- When a task is done, add a dated line to LOG.md. Then recommend one: keep going here, run /compact, or run /clear for a fresh start, and say why. If a different model fits the next task better, name it. I'll switch with /model.
5. When you're done, list what you created or changed. Then tell me to run /clear and ask "where did we leave off?" to test it.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Using the regular Claude app instead? I haven't run this version myself, but it's the same idea with two manual steps:
Create a Project and add a short file called CONTEXT with four headings: Goal, Where things stand, Decisions and corrections, Next step.
Paste this into the project instructions:
At the start of each chat, read the CONTEXT file in this project and tell me in two lines where we left off and what's next.
Whenever we decide something, or I correct you, update CONTEXT if you can save to it. If you can't, give me the complete updated CONTEXT right away so I can replace the old file.
Keep CONTEXT under 30 lines and current only. When a task is done, give me one dated line to add to a separate LOG file. Then tell me whether to keep going or start a new chat, and why. If a different model fits the next task better, name it.
Hope this helps. Shout out to for asking about this during a community share out.
7
7 comments
Ivan Soto
5
Keeping a session log in Claude Code: what worked for me (open to suggestions)
Clief Notes
skool.com/cliefnotes
What we give away free beats most paid courses. 40+ lessons, growing.
Leaderboard (30-day)
Powered by