When compacting this conversation, follow these preservation priorities.
- Decisions with reasoning — What was decided AND why
- Code changes — File paths, what changed, the intent
- Current task state — What we're doing and progress made
- Errors and fixes — Problems encountered and how resolved
- User-provided context — Constraints, preferences, domain knowledge
- Open questions — Unresolved items that need addressing
- Exploration dead ends — Keep only the conclusion, not the journey
- Verbose tool output — Summarize file listings, grep results, traces
- Intermediate reasoning — Keep conclusions, drop the process
- Repeated operations — Summarize patterns, don't list each one
- Superseded info — Drop things that are no longer true
Structure the compacted context as:
CURRENT STATE: [task] / [phase] / [status]
DECISIONS:
- [decision] — [why]
CODE CHANGES:
- [file:line] — [what and why]
OPEN QUESTIONS:
- [question]
KEY CONTEXT:
[essential background]
NEXT STEPS:
1. [action]
Use bullet points. Include file paths. Keep reasoning for decisions.