Compact-and-Continue
When context approaches its limit mid-task, the agent writes a structured continuation summary (state, next steps, open questions, key facts), context compacts, and work resumes from the summary.
When to use
Any task that outlives a context window: the loop that makes long work possible at all.
Steps
| Step | What happens | Verification |
|---|---|---|
| Checkpoint before the cliff | Write the continuation summary while capacity remains, not after truncation. | Summary passes the cold-reader test: sufficient to continue with zero prior context. |
| Compact | Context compresses; the summary and remaining budget carry forward. | Post-compaction state includes the summary verbatim. |
| Reconcile and resume | Re-verify the summary's claims against the workspace before trusting them, then continue. | Stated done items spot-checked; drift flagged rather than inherited. |
Specification
| Verification method | Reconcile-on-resume: the summary is a claim set to verify, exactly as in checkpoint-resume. |
|---|---|
| Recovery behavior | reconcile-then-continue |
| Observability | The summaries themselves, versioned per compaction. |
| Inputs | Long-running task, Compaction mechanism |
| Outputs | Continuous progress across context boundaries |
| Risk level / maturity | medium / established |
Failure modes
- Summaries recording intentions as outcomes
- The one critical detail dropped in compression
- Resuming without reconciliation, inheriting stale claims
Assessment
Checkpoint-resume's in-session sibling, and the pattern every agent runtime now implements somewhere. The intentions-as-outcomes failure is the one that poisons; write summaries in past tense only about verified facts.