π Step 9: AI/LLM#360 / 498
Compaction
Context Compaction
πOne-line summary
A technique that summarizes and compresses earlier conversation when the context window fills up so work can continue.
β¨Example
π€
μ»΄ν©μ
Context Compaction
β‘Vibe coding prompt examples
>_
Write TypeScript logic that summarizes and compresses earlier chat history when our chatbot nears its token limit. Always preserve user preferences and decisions.
>_
After compaction the agent forgets what it was doing. Define a template of must-keep items for the summary (goal, done, remaining, key files).
>_
Write a handoff note summarizing the work so far so the next session can pick it up.
Try these prompts in your AI coding assistant!