Context engineering for agents 101 (part 3): reversible compaction and prompt-cache-safe memory
Mutating your system prompt with per-turn memory slows coding agent turns by 5.27x (3.37s vs 0.64s on Qwen3.8-27B). See how tail memory placement and reversible Brick compaction (-66.4% main / -45.1% net tokens) fix long OpenCode sessions.