The fresh-session workflow: session logs that carry your context
I build Settl, an expense-splitting app, solo with Claude, and my worst debugging days all had one thing in common: a chat session that had been alive for six hours. The model was not getting worse, the conversation was. This is the workflow that fixed it.
Why long sessions get dumber
Every session accumulates more than answers. It accumulates:
- Dead ends you explored and abandoned. The model still sees them, and part of its attention still weighs them.
- Stale assumptions from two hours ago that you have since reversed. "We're using Redis" keeps echoing long after you decided against Redis.
- Corrections like "no, ignore that" and "go back to the old version". An instruction to forget is itself more context. The wrong plan is still sitting in the transcript, steering.
- Half-finished tangents that make every new answer hedge toward all of them at once.
None of this is a bug. A long transcript full of contradictions produces answers that average over the contradictions. That is why hour five feels like arguing with someone who keeps bringing up things you already settled.
The signs a session has rotted
Restart when you notice any of these:
- Claude re-suggests an approach you explicitly rejected an hour ago.
- It describes files the way they used to be, not the way they are now.
- Answers grow longer and more hedged: "depending on whether you went with X or Y".
- You are re-explaining a decision for the third time.
- It "fixes" something by quietly reverting a change you made on purpose.
Any one of these means the transcript is now working against you.
The fix: end sessions on purpose
Do not let a session trail off and die of old age. End it with one instruction:
Save a session log: what we did, what worked and what we decided, what's next,
and any gotchas we hit. Write it to docs/sessions/2026-07-12.md for someone
who has never seen this conversation.
Thirty seconds of writing buys the next session a clean brain with full memory.
The session-log template
Four sections, always the same, so future sessions know exactly where to look:
# Session log: 2026-07-12
## What we did
- Added rate limiting to POST /api/login (src/auth/login.ts)
- Migrated session storage from cookies to signed JWTs
## What worked / decisions
- JWT over server sessions: we need stateless auth for the mobile client.
- Rejected Redis for rate limiting. In-memory is fine at our traffic.
Revisit past 1k requests per second.
## What's next
1. Refresh-token rotation (started, not wired to the client yet)
2. Add login attempt metrics
## Gotchas
- The test suite silently skips auth tests unless AUTH_SECRET is set.
- validateToken in src/auth/login.ts allows 5s of clock skew on purpose.
Do not "fix" it.
The gotchas section earns its keep fastest. It is where "we already tried that and here is why it failed" lives, which is exactly the knowledge a fresh session lacks.
Where the logs live
docs/sessions/YYYY-MM-DD.md, committed to the repo. Not a notes app, not a gist. In the repo,
because:
- The next session can load it from a single file path.
- It travels with the code through clones, branches, and machines.
- Six months of logs is a dated, honest history of every decision and every dead end. You get project documentation for free, written at the only moment anyone actually writes documentation: while it is still fresh.
Two sessions in one day? 2026-07-12-b.md. Do not overthink the naming.
Starting the next session
Open a fresh session and point it at the log:
Read docs/sessions/2026-07-12.md, then pick up item 1 from "What's next".
That is the whole trick. The new session gets every decision and zero dead ends. No ghost of the Redis plan you abandoned, no "ignore that" debris. It starts from where the project actually is, not from where a six-hour transcript thinks it is.
Resuming vs restarting
They are different tools. Pick deliberately:
- Resume the old session when you stepped away mid-task and nothing rotted. The context is still accurate, you just went to lunch.
- Restart from the log when the task changed, the plan changed, or you spotted any rot sign from the list above.
- When in doubt, restart. A restart with a good log costs close to nothing. A rotted session taxes every answer for the rest of the day.
The failure mode to avoid is resuming out of sunk-cost feeling: "but there's so much context in there". If that context were still good, you would not be hesitating.
Run this on your codebase
Paste this at the end of your current session, whatever state it is in:
Before we end this session, write a session log to docs/sessions/ named with
today's date (create the folder if needed) with four sections:
1. What we did: every change made, file by file, one line each.
2. What worked / decisions: choices we made and the reasoning, so a future
session never relitigates them.
3. What's next: concrete next steps, most important first.
4. Gotchas: anything surprising about this codebase that cost us time today,
including approaches we tried and abandoned, and why.
Write it for a competent engineer who has never seen this conversation.
Then give me the one-line prompt I should use to start my next session
pointing at this log.