Ijon Tichy travels undercover to a robot world, joining an organization to clean up world history through time travel.
Things go crazy immediately. His spaceship runs into gravitational vortices at relativistic speeds, resulting in massive time anomalies. It may be a blessing in disguise. The reason he couldn't get out of the way was that a meteor had shattered the drive regulator and rudder. He could no longer steer his ship. He had a spare rudder, but couldn't install it. It was a two-man job and he was alone. So when other versions of him start appearing, all he should need to do is team up with one of them, fix the rudder and leave the gravitational vortex field.
After that gets straightened out, he goes undercover. A ship's computer has mutinied and started its own colony, reproducing itself on a previously uninhabited planet. The insurance company paid the shipowner's claim, and now believes that the ship, its computer and all its progeny belong to them. Tichy disguises himself as a robot and goes to investigate.
On another voyage, he heads to a planet where the government irrigation agency has irrigated beyond all need and refused to give up power. People live in water and are jailed in dry cells if they violate the love of water.
After his modern voyages, he comes back from 2166 to recruit himself as a member of Theohippip, the Teleotelechronistic-Historical Engineering to Optimize the Hyperputerized Implementation of Paleological Programming and Interplanetary Planning. History is in a mess because of all the time travelers. Theohippip's mission is: "For World History to be regulated, cleaned up, straightened out, adjusted and perfected, all in accordance with the principles of humanitarianism, rationalism and general aesthetics. You can understand, surely, that with such a shambles and slaughterhouse in one's family tree it's awkward to go calling on important cosmic civilizations!...If need be, alterations will be made even before the rise of man, so that he arises better."