ReCAP: Recursive Context-Aware Reasoning and Planning for Large Language Model Agents