Asked about Managing the context as it grows

What must survive compaction?

An answer that works

The original task, anything the user said including corrections and constraints, decisions already taken, and failures already hit. Losing those causes the agent to wander or repeat work.

Reading an answer is not being able to give one. The section that teaches this is Managing the context as it grows, 4 hours of The agent loop.

Learn this properly