That could be Taklamakan, by Bruce Sterling. 2 freelance infiltration agents equipped with a bunch of advanced bio-tech rock climbing and spy gear infiltrate a massive cavern under the Taklamakan desert. In it, they find 3 fake spaceships. In one ship, everyone really believes they are on a star voyage to somewhere else and live at a medieval level of technology. In another, they are aware they are not in space and put a huge amount of effort into breaking out with enormous ballista. Everyone in the third died from a fire. Security and maintenance of the cave is handled by nano-assembly technology that breeds robots in a virtual space, and then builds them in real life in some kind of assembly goo, making very weird robots.
The infiltrators speculate that the cave was built by robots at the Sphere's behest (a Chinese hegemony), the probably forgotten about.
The two infiltrators are a woman who had her gonads removed (deactivated? it was unclear) to render her a "neuter", for an alleged 5% metabolic advantage, and an older man at the tail end of his career. They are both rock climbers at heart, and there are strong rock climbing themes.
Ultimately, the younger infiltrator dies saving a small child who was part of a break out attempt from ship 2, and the older one breaks into the peaceful spaceship, and intends to live out his remaining life there. He disposes of his colleagues body in the assembly goo at the bottom of the cave. After several years, the computer spawns an army of climbing robots that intend to escape the cave themselves. It is implied the computer was inspired by the climbing technology it consumed on the body of the infiltrator. The older infiltrator leaves the cave at this point, with the wave of machines.