Week 9 · Build the Clone

Memory & Sessions

Never lose your place

⏱ ~6 hours, hands-on🐍 Python / 🔷 TypeScript🛠 You ship: An agent that remembers across days
What this week is

An agent that forgets everything when the terminal closes is a goldfish with tools. Real work spans days and projects, and the agent needs to remember three different things, each with its own lifetime.

The session — this specific conversation, so you can close your laptop and resume tomorrow. User memory — durable facts about you that follow the agent across every project. The workspace handoff — where the work stands in this repo, so the next session starts without re-discovering everything.

All three are the same trick you have used since Week 4: the conversation is just data, so memory is just files. No database, no service — a JSONL transcript, a directory of markdown facts, and a PROGRESS.md.

Durable state lives in plain files on disk, written as it happens. That makes memory inspectable, portable, and crash-proof.

The walkthrough

Each part adds one capability to the same growing codebase, and each is a runnable checkpoint.

  1. 01SessionsA durable transcript — one line per message, saved live as it happens.
  2. 02ResumePick a session back up days later with full fidelity.
  3. 03User memoryDurable facts about you, scoped across projects.
  4. 04Workspace stateWhere the work stands in this repo, right now.
  5. 05The handoffA PROGRESS.md that lets a fresh session continue without a re-brief.

After this week you can

  • Make agent sessions durable and resumable
  • Design memory with the right lifetime for each kind of fact
  • Hand work off cleanly between sessions