11.2 Summarize state between iterations

Overview and links for this section of the guide.

Why summaries beat long histories

Long chat histories create three problems:

  • Cost: you pay to resend history repeatedly.
  • Conflicts: old instructions linger and contradict new ones.
  • Attention dilution: the model focuses on the wrong details.

A short, structured summary solves all three.

Summaries are context compression

You are converting messy conversation into a stable state block. This is one of the highest-leverage skills in long projects.

What to summarize (the high-value state)

A useful iteration summary captures:

  • Current goal: what you’re working on right now.
  • Constraints: runtime, deps, file scope, safety rules.
  • Decisions: chosen approach and why.
  • Current architecture: brief file/module map.
  • Acceptance criteria: tests/examples that define “done.”
  • Status: what’s done, what’s next, what’s blocked.
  • Known issues: remaining failures/errors and how to reproduce them.

When to summarize (cadence)

Good times to summarize:

  • after a ship point (tests pass + commit),
  • before a refactor,
  • after a long debugging session,
  • when switching models,
  • when the conversation feels “drifty.”
Summarize when you feel confused

Confusion is a signal that context is bloated or contradictory. Summaries restore clarity.

Copy-paste summary templates

Template: project state summary

STATE SUMMARY (authoritative)

Goal:
- [...]

Constraints:
- Runtime: [...]
- Dependencies: [...]
- File scope: [...]
- Safety/logging: [...]

Architecture (file map):
- module_a: [...]
- module_b: [...]

Acceptance criteria:
- [...]

Current status:
- Done: [...]
- Next: [...]
- Blocked: [...]

Known issues / repro:
- [command] => [error]

Template: debugging summary

DEBUG SUMMARY

Bug:
- Expected: ...
- Actual: ...

Repro:
```sh
...
```

Most likely hypotheses:
1) ...
2) ...

Evidence so far:
- ...

Next test to run:
- ...

A prompt to generate a good summary

Create an authoritative state summary from this conversation.

Requirements:
- Keep it to 10–20 bullets
- Include: goal, constraints, acceptance criteria, file map, status, known issues
- Highlight any conflicting instructions or unresolved decisions
- Do not propose changes yet

Where to go next