Every session you open in Claude Code starts empty.
No memory of your stack. No knowledge of your conventions. No idea what you tried last time. So you explain it again. And again. Those tokens add up fast, and you hit your limit before you've done anything interesting.
There's a built-in fix for this. Anthropic ships it with Claude Code. Most people haven't set it up.
CLAUDE.md: persistent context for every session
Create a file at ~/.claude/CLAUDE.md. Whatever you put in this file gets loaded into every session, automatically, before anything else. You write it once and stop re-explaining yourself.
A useful starting point:
```
My setup
- Stack: Next.js, TypeScript, Postgres
- Package manager: pnpm (not npm or yarn)
- Testing: Vitest for unit, Playwright for E2E
- Commits: conventional commits, imperative mood
How I work
- Always write tests before implementation
- Prefer explicit error handling over silent failures
- Keep functions small and single-purpose
```
This is your personal CLAUDE.md. It applies across every project on your machine. You can also add a project-level CLAUDE.md at ./CLAUDE.md in any repo — that one gets committed and shared with your team.
Anthropic recommends keeping it under 200 lines. Longer files consume more context and Claude follows them less reliably. Specific, concrete instructions work better than general principles.
Auto memory: Claude learns as you go
Claude Code has a second mechanism called auto memory. As you work, Claude takes notes on things worth remembering: build commands it discovers, debugging patterns that worked, preferences you've expressed. At the start of your next session, those notes load automatically.
It's on by default. Run /memory in any session to see what Claude has saved, edit it, or toggle it off if you want manual control.
When you want Claude to remember something specific, just tell it: "remember that the API tests need a local Redis instance running." It saves that to memory and it's there next time.
What this changes
Before: every session starts from zero. You explain your stack, your conventions, your context. That's overhead on every call before you've done any real work.
After: Claude starts each session knowing who you are and how you work. Prompts get shorter. Follow-up calls drop. You stop burning your allocation on setup.
The limits don't feel as tight when you're not spending half your tokens on context you've already provided ten times.
If you want a more complete setup with structured skills and agent configuration beyond the basics, I can help get you there.