Topic 2 of 5 · 4 min read
Progress files and feature lists as agent memory
Goal: Write a progress file and feature list that a fresh session can read to resume the work without the old transcript.
A fresh session should be able to resume a long job from three files alone: a feature list with pass or fail status, a progress note, and the git log. The agent does not remember the last session. What it can read, it knows.
Check yourself · 1 of 3
Why does a long agent job keep its plan in files instead of the chat?
Why it matters
Chat history is not memory. After a reset, a new session sees none of it. If the plan lives only in the old conversation, the new session re-invents it, usually smaller and slightly different. Written state that is precise and structured gets the same behaviour every time.
How to do it
- Keep a feature list as data. One JSON entry per feature with a stable id, a plain description, concrete test steps and a
passesflag. The agent may flippassestotrueonly after running the steps. It must not delete or reword entries. - Keep a progress file for the narrative. One dated entry per session: what was done, what is half done, what to do next, known problems, and the exact command that starts the project.
- Treat git as the third file. Commit messages that name the feature id make
git log --onelinea readable timeline.git diffagainst the last commit shows what the last session changed. - Make reading cheap. Short files, newest entry first, no pasted logs. A session spends context on reading, so every extra line costs work later.
- Put the rules in an instruction file. Things that never change, such as the test command and the style rules, belong in
CLAUDE.mdorAGENTS.md. Things that change every session belong in the progress file.
Before and after
Weak note:
Auth mostly done. Some tests flaky. Continue with the rest.
Better entry:
## 2026-12-01 session 7
Done: F-012 password reset email (test passes: npm test -- reset)
Half done: F-013 rate limit, middleware written, not wired in app.ts
Next: wire rateLimit() in app.ts line 40, then run tests/rate.test.ts
Known: tests/export.test.ts fails on Windows paths, unrelated, F-031
Start: ./init.sh && npm run dev
The first note forces the next session to guess. The second lets it begin at a file and a line.
What goes wrong
- Editable goals. If the agent may rewrite feature descriptions, it can make a failing feature pass by redefining it. Restrict edits to the
passesfield. - Optimistic status. A feature marked as passing because the code was written, not because the test ran.
- A progress file that grows forever. After 60 entries the file fills the context. Archive old entries and keep the last few.
- Notes without commands. "Run the tests" is weaker than the exact command and the file to open.
Examples
A feature entry the agent cannot argue with
{
"id": "F-012",
"description": "User can request a password reset email",
"steps": ["POST /reset with a known email", "expect 202", "expect one email in the mail sink"],
"passes": false
}
The steps are commands a session can run. The status flips only when they pass.
Using git as the timeline
Commits are named F-012: password reset email. A new session runs git log --oneline -10 and sees the last ten features in order, then git show --stat HEAD to see exactly which files the last session touched before it read any notes.
Key points
- A fresh session knows only what it can read, so the plan must live in files and git, not in chat history.
- A feature list as JSON with stable ids and a passes flag gives the agent a checkable definition of done.
- Allow the agent to change only the passes field, never to delete or reword features.
- Each progress entry says what is done, half done, next and broken, with the exact start command.
- Keep the notes short and recent, because every line the new session reads costs context.
Common mistakes
- Storing the plan only in the chat, so a new session has nothing to read.
- Letting the agent edit or remove feature descriptions to make them pass.
- Marking a feature as passing without running its steps.
- Writing vague notes such as "continue with the rest" instead of a file, a line and a command.
Check yourself · 2 of 3
Which field of a feature-list entry should the agent be allowed to change?
Check yourself · 3 of 3
Which progress note lets a fresh session start fastest?
Practice items, not counted towards your mastery.
Start here
- Effective harnesses for long-running agents (Anthropic) (opens in a new tab)ArticleFree
Describes the initializer session, feature list, progress file and one-feature-per-session pattern this skill teaches.
- Effective context engineering for AI agents (Anthropic) (opens in a new tab)ArticleFree
Covers compaction, structured note-taking and sub-agent hand-offs for tasks that outgrow the context window.
- Checkpointing (Claude Code docs) (opens in a new tab)DocsFree
Explains how Claude Code snapshots edits, rewinds code and conversation, and what checkpoints do not cover.
More for this topic
- How Claude remembers your project (Claude Code docs) (opens in a new tab)DocsFree
Shows how instruction files are loaded at the start of each session, the simplest persistent memory.