Foundations
Session Lifecycle
Stop re-explaining yourself every session. A five-minute setup makes Claude Code remember your projects, preferences, and yesterday's work automatically.
On this page (8 sections)
If your first message every session is explaining what you're working on, you're wasting 10 minutes.
That's not an AI limitation. That's a workflow problem. And it's fully fixable.
I built this system after realizing I was typing the same three paragraphs of context at the start of every session: what project, what stage, what just happened. Once I stopped doing that, sessions got noticeably faster. Not because Claude Code got smarter, but because I stopped treating it like a first meeting every time.
The Three Phases
Every productive session follows the same pattern: start warm, work smart, end with a trail. Simple as that.
Phase 1: Start (Don't Start Cold)
When a session begins, Claude Code reads three things:
- Memory (
MEMORY.md): Who you are, what you're working on, your preferences, past corrections - Latest handoff: What happened last session, what decisions were made, what's next
- Project docs: Current state of your active projects
You configure this in CLAUDE.md:
## Session Lifecycle
**Starting**: Read MEMORY.md. Check handoffs/ for latest handoff. Resume context.Three reads. Zero re-explanation. It picks up where you left off, and you say "continue with the dashboard feature" instead of typing four paragraphs of setup.
Phase 2: Work (Stop Guessing, Start Planning)
Four things separate "using Claude Code" from "being productive with Claude Code":
Plan before you build. If the task has more than two steps, don't just start coding. Enter plan mode, align on the approach, then execute. This sounds slower. It genuinely saves tokens and prevents the "that's not what I wanted" rework loops that cost real time.
Delegate to sub-agents. Research in one agent, code review in another, test execution in a third. Your main conversation stays on decisions. Sub-agents handle the grunt work so you're not burning your context window on mechanical tasks.
Capture every correction. This is the one people skip, and it's the highest-ROI habit here. When Claude Code makes a mistake and you fix it, save that correction as a memory entry. Otherwise next session: same mistake. It's like training a team member who gets complete amnesia every night.
Verify before done. Nothing is done until tests pass, logs are clean, and the behavior matches what you asked for. "It looks right" is not verification. Run the thing.
Phase 3: End (Two Minutes That Save Ten)
Before you close the session:
-
Write a handoff if work is in-progress. Doesn't need to be long. Three bullet points:
- What was done
- What's next
- Any decisions or blockers
-
Save corrections to memory if Claude Code made mistakes you had to fix. These become permanent rules.
Here's a handoff template:
# Dashboard Feature - 2026-03-29
## What was done
- Layout component finished, responsive grid working
- Chart component 80% done, missing tooltip
## Key decisions
- Went with Recharts over Chart.js (better React integration)
- Using server components for the data layer
## What's next
- Finish chart tooltips
- Add loading skeleton
- Wire up real API dataThat took 60 seconds to write. Tomorrow's session reads it and skips 10 minutes of "where was I" fumbling.
The Memory Types
Not everything belongs in memory. Here's the cheat sheet:
| Save this | Skip this |
|---|---|
| Your role and preferences | Code patterns (read the code instead) |
| Corrections and confirmations | Git history (use git log) |
| Active project context | Debugging solutions (the fix is in the code) |
| Where to find external things | Temporary task details |
Four memory types, each with a different purpose:
- user: Who you are, how you work ("Senior PM, prefers direct communication")
- feedback: What you corrected ("Don't mock databases in tests. We got burned last quarter.")
- project: What's happening ("Auth rewrite is compliance-driven, not tech debt")
- reference: Where to look ("Pipeline bugs tracked in Linear project INGEST")
Each memory is its own markdown file. MEMORY.md is just an index that links to them. The system stays lean because you only load what's relevant to the current task.
What This Looks Like Over Time
Week 1: Sessions start faster. Less re-explanation. Writing handoffs feels like extra work (it is, slightly).
Month 1: Memory captures your style. Common mistakes stop repeating. The friction of writing handoffs disappears because you see the payoff.
Month 3: It knows your projects, people, preferences. Anticipates what you need without you spelling it out.
Month 6: Institutional knowledge is encoded. A new team member could read your memory files to get up to speed on how you work and what matters in your projects.
This isn't the AI getting smarter. It's your practice getting more efficient. Small investments that compound.
Set It Up Right Now
Five minutes. Seriously.
- Add the session lifecycle section to your CLAUDE.md
- Create
memory/MEMORY.mdas an empty file - Create a
handoffs/directory - Write your first memory: who you are, what you're focused on
- At the end of today's session, write a three-line handoff
That's it. You're in the system. Everything after this compounds.
New guides, when they ship
One email, roughly weekly. CLAUDE.md templates, workflows I actually use, and the cut-for-length stuff that does not make the public guides. One-click unsubscribe.
Or follow on Substack