Always have another agent around that is just reviewing code. "Look for duplicate code, code smells, bad architecture, future scalability problems..."

I usually keep one agent/prompt/context ripping through new features and another 1-3 agents/prompts/contexts reviewing, testing, planning.