COMPASS: Enhancing Agent Long-Horizon Reasoning with Evolving Context