How to keep Claude Code on track across sessions
Claude Code forgets what it did last session, so keep the plan outside the chat. Put durable rules in CLAUDE.md, and track the real work as tasks — on a board the agent reads and updates itself, not in your head. Each session then starts from the board, picks up the next task, and leaves it updated for the one after.
Why each session starts cold
Claude Code is sharp inside a session and blank between them. Close the window, open a new one, and the plan you agreed an hour ago is gone. It still reads your code, but it doesn’t remember which task was next or what it already tried.
So the fix isn’t a better memory. It’s keeping the plan and the task state outside the chat, somewhere the agent can read at the start of every session. There are a few ways to do that, from free to paid. Start with the free ones.
First, the built-in ways
Put durable rules in CLAUDE.md
CLAUDE.md is a file Claude Code reads at the start of a session. It’s the right home for things that rarely change: how to build and test, the conventions to follow, what not to touch. Good rules here stop the agent re-deciding the basics every time.
What doesn’t belong in CLAUDE.md is live task state. It changes every session, and stuffing it into the rules file makes the file long and the agent slower to follow.
Keep a markdown TODO file
A plain TODO.md in the repo is the simplest task tracker there is. Ask the agent to read it, do the top item, and tick it off. It survives a new session because it’s a file in your project.
The catch is upkeep. You end up editing it by hand, or reminding the agent to, and it drifts out of date the moment you’re busy.
Be deliberate about /clear
Starting fresh with /clear keeps a session focused, but it also throws away context. If the plan only lived in the chat, it’s gone. This is exactly why the plan needs to live in a file, not the conversation.
Where the free ways break down
Rules in CLAUDE.md and a TODO.md get you a long way. They break down on the same thing: you are the one keeping state current. The agent does the work, then you update the list, or you forget and the list lies. Across a week of sessions, that gap is where work gets dropped or done twice.
The Hatchlog way: a board the agent keeps
Hatchlog moves task state onto a board that the agent reads and updates itself. You describe a feature, and the agent plans it into tasks. From then on it picks up the next task, moves the card as it works, and writes back what changed. You didn’t touch the board.
Because the state lives on the board and not the chat, a new session starts by reading it. The agent asks for the next task and carries on. For what the agent can and can’t do there, see Working with agents. Rules still live in CLAUDE.md — Hatchlog can add its own from Settings → Agents → Add rules to.
A quick comparison
| Approach | Survives a new session? | Who keeps it current? |
|---|---|---|
| CLAUDE.md rules | Yes, for rules | You, rarely |
| Markdown TODO file | Yes | You, by hand, every session |
| Hatchlog board | Yes | The agent, as it works |
Common problems
- The agent ignores the plan. Put the instruction where it reads it: add a rule to
CLAUDE.mdwith Settings → Agents → Add rules to. - Tasks pile up and nothing moves. An agent starts the top task in Todo, not Backlog. Move a task into Todo when you want it picked up.
- You still lose the thread mid-task. Before you stop, ask the agent to update the task with where it got to. The next session reads that and continues.
FAQ
Does Claude Code remember past sessions on its own?
Not the work. It reads your project files each session, but the plan and the state of each task aren't kept unless you write them down somewhere it can read.
Is a CLAUDE.md file enough to keep it on track?
CLAUDE.md is great for durable rules, like how to build and test. It's the wrong place for live task state, which changes every session and would bloat the file.
Do I really need a board?
No. A markdown TODO file works. A board helps once the agent updates it for you, so the state is always current without you editing anything by hand.
Does this work with Cursor and Codex too?
Yes. The same board works with Claude Code, Cursor, Codex and Claude Desktop. Token cost is measured for Claude Code only.