Every conversation begins with no memory of the prior one.
Each new session, the agent loads what it can — the project's claude.md, the memory index, your first message — and that is the entirety of its context. Yesterday's debugging path, the false trail you ruled out, the reason you chose approach A over approach B: none of it survives unless it was written somewhere the next session will read.
Most engineering tools assume continuity. Claude Code does not. The first time this catches you out, you spend an hour re-explaining the project. The tenth time, you start to suspect there is a discipline you are missing. There is. This manual describes it.
The question, once you accept the premise, is simple: what do you encode, and where? There are two slots, and they answer different questions.
Memory files hold the durable knowledge of a project — its architecture, its conventions, the gotchas you've burned hours discovering, the workflow rules you want to apply session after session. They are written once and consulted forever. They should be true on the timescale of the project itself, not on the timescale of any one task.
The handoff prompt holds the working set — where you left off this afternoon, what is in flight, what the next session should propose first. It is written at the end of every working session and consumed at the start of the next one. It has a known shelf life of exactly one session.
Together they form a protocol between past-you and future-you, with the agent as the courier. Get this protocol right and the agent is a long-running collaborator. Get it wrong and you have an expensive autocomplete.