On a baking-hot afternoon in January, Aaron Davis climbed out of a white Toyota Land Cruiser that had arrived at a village of clay-walled huts. It was the peak of Sierra Leone’s dry season. The ground was a rich ochre and dotted with deep, round shafts—mines which villagers had dug to prospect for gold and diamonds. But Davis had come in search of a different kind of treasure.

On our way to the village, in the east of the country, we had driven past plantations of oil palms and cashews, and a railway carrying iron ore to the coast as part of a Chinese-backed mining venture. Davis, who wore a biker bandanna around his neck to protect it from the sun, had allowed me to join him on condition that I keep the name of the village secret. There were rumours that other foreigners had been poking around.

A local farmer called Alex John Bulle led us down a path behind a hut on the edge of the forest. It was a relief to feel the cool air beneath the trees. Davis darted over to some yellowing, spindly bushes. To my untrained eye, there was little to distinguish them from any other foliage. But this was no ordinary plantation. It was a secret experiment to develop a coffee plant that could withstand climate change.