Text this: CANTANTE: Optimizing Agentic Systems via Contrastive Credit Attribution