AI Agent Memory Between Sessions: Session Handoff, PROGRESS.md and Bootstrap Contract
How an AI coding agent remembers a project across sessions: compaction vs context reset, session handoff, PROGRESS.md, git checkpoints, decision log, warm start and init.sh. Context recovery cost metric.
- Implement continuity artefacts and reduce re-exploration time to almost zero.
- Design a bootstrap contract that verifies the agent's readiness rather than relying on guesswork.
- Measure recovery cost before and after — and see the difference in hard numbers.
강의 시작 부분
Fifteen minutes to remember yesterday
- An engineer arrives each morning with their memory completely wiped
- They're brilliant, but can't recall yesterday's decisions
- They have to re-read the code and piece together the history
- An agent that has lost its context behaves exactly the same way
Picture an engineer who turns up at work every morning with their memory of the previous day completely wiped. They're brilliant, but they don't remember which architecture option was chosen yesterday or why the others were ruled out, which files have already been rewritten, or where the tests stand. They have to re-read the code, reconstruct the history, and only then carry on working. This is exactly how an agent behaves once it's lost its context: fifteen to twenty minutes go on reconnaissance, and decisions get made all over again — often against what was already settled yesterday.
The agent repeats its recon and argues with its past self
- Thirty minutes of work — and the context runs dry
- The new session knows none of the decisions, changed files or test status
- Fifteen minutes go on repeating the reconnaissance
- The cure isn't more memory — it's a logbook
Thirty minutes of work, and the agent is already arguing with itself. It had built most of the feature, then the context ran out, and the new session doesn't remember which decisions were taken, why option B was chosen, which files have been changed, or where the tests stand. It spends fifteen minutes re-running the reconnaissance and, more likely than not, goes against the previous approach. The right mental model here is a brilliant engineer with total amnesia every morning. And the fix isn't giving the agent more memory — it's introducing a logbook: a set of files that capture the state between sessions.
Why growing the context window doesn't solve the problem
- Even a million tokens get exhausted by complex tasks
- Code, decision history, tool output, conversation — it all grows
- Needs grow faster than windows do
- This is an architecture problem, not a capacity question
Think of an exam: no matter how many hours you're given, a genuinely hard question will still eat the time right up to the last minute. It's the same with an agent's context window: give it a million tokens if you like — a complex task will exhaust that too. The agent reads the codebase, accumulates a history of decisions, takes in tool output and holds the whole conversation, and all of it grows faster than model windows do. You can't buy reliability simply by raising the token limit — sooner or later the exam clock runs out, and the question isn't whether that moment arrives, but what you've prepared for when it does.
전체 강의는 구독 후 이용 가능
전체 버전에는 24개의 슬라이드가 더 있습니다.
로그인하고 구독하면 영상, 모든 슬라이드, 노트, 테스트, AI 튜터, 면접을 이용할 수 있습니다.
로그인 또는 회원가입 구독하기강의 목차
- Fifteen minutes to remember yesterday
- The agent repeats its recon and argues with its past self
- Why growing the context window doesn't solve the problem
- Compaction keeps the 'what' but loses the 'why'
- Context anxiety: the agent rushes like a student racing the bell
- ❓ Checkpoint: compact or reset?
- What compaction keeps — and what a reset wipes clean
- A practical criterion: the sixty percent mark of the window
- 💡 Walkthrough: forty percent and a single session — that's compaction
- The four continuity artefacts
- PROGRESS.md — where we are now
- DECISIONS.md — why we did it this way
- Git commits as free checkpoints
- Fifteen minutes versus three: work out your cost of amnesia
- Fifteen minutes versus three: work out your cost of amnesia
- Four fields that are enough for a complete handoff
- Coming up next: initialisation as a separate phase
- 🛠 'Add search' — and the agent has already spent half an hour getting to grips with the project
- Implementation and initialisation optimise different things
- Pitfalls: code accumulated without verification
- The bootstrap contract: four readiness conditions
- Myth: initialisation is a waste of time at the start
- Myth: initialisation is a waste of time at the start
- Approach A versus approach B: who wins over four sessions
- Approach A versus approach B: who wins over four sessions
- End-to-end project: step three — the payment backend logbook
- From amnesia to discipline — and on to scope
이 강의 관련 글
- CLAUDE.md와 AGENTS.md: 무엇이며 무엇을 써야 하고 에이전트가 규칙을 무시하는 이유
- Harness engineering이란: AI 에이전트를 실제로 쓸 수 있는 도구로 만드는 방법
- AI 에이전트를 신뢰할 수 있게 만드는 방법: 측정에서 자율 작업까지 단계별 로드맵
- 에이전트가 "완료"라고 했지만 기능이 작동하지 않는다: AI 에이전트 작업을 검증하는 방법
- Harness vs context engineering: 하네스 엔지니어링은 prompt 및 context engineering과 어떻게 다른가
이 강좌의 모든 강의
- What Is Harness Engineering? Why AI Coding Agents Fail Because of the Environment
- Error Accumulation in AI Agents: Why 95% Per-Step Accuracy Fails by Step 10
- AI Agent Reliability Metrics: MTBF, MTTR, Blast Radius and Little's Law
- Why AI Agents Fail in Production: Five Failure Layers and a Diagnostic Loop
- What an AI Agent Harness Is Made Of: Instructions, Tools, Environment, State, Feedback Loops
- Repository Map for AI Coding Agents: Project Structure and State Without Memory
- AGENTS.md Best Practices: Why a Giant Instructions File Fails and How to Build a Router
- AI Agent Memory Between Sessions: Session Handoff, PROGRESS.md and Bootstrap Contract
- feature_list.json for AI Agents: WIP=1, Feature Status and verify.sh Verification
- Agent Says 'Done' but the Feature Is Broken: Verification Gap and Definition of Done
- All Tests Pass, Feature Is Broken: E2E Tests and Architecture Rules for AI Agents
- AI Agent Observability: Sprint Contracts, Evaluator Rubrics and Clean Session Exit
- Autonomous AI Coding Agent for Hours: Loop Engineering and Stop Conditions
- Graph Engineering for AI Agents: When a Single Loop Is Not Enough and You Need a Task Graph
- Building an AI Agent Harness From Scratch: AGENTS.md, feature_list.json, verify.sh and an Autonomous Loop