Lesson 13 / 25

Compaction and Handoff Notes

Carry long tasks across context resets with summaries and a progress file.

Plan for the reset

Long tasks outgrow one context window. Compaction summarises the conversation so work can continue. For multi-hour work, have the agent keep a progress file in the repo (what is done, what is next, decisions made) so a fresh session can resume from facts, not memory.

A progress file

Short, factual and current. Ask the agent to update it after each completed step.

# PROGRESS.md

## Done
- Migrated users table to new schema (PR #41)
- Added tests for login

## Next
- Migrate orders table

## Decisions
- Keep old column for one release; drop in next.

Quick check: Why keep a progress file for a long task?

  • So a fresh session can resume from recorded facts
  • To make the repo larger
  • Because Git requires it
  • To avoid writing tests
Answer

So a fresh session can resume from recorded facts — Written state survives context resets; memory inside a conversation does not.