Agreement reached despite rising geopolitical tensions and US cuts to climate programmes