After Mr. Burns' lawyer tells him that drug tests for the plant workers are costing him money, Smithers proposes to replace the employees with robots in order to cut costs. Mr. Burns fires all of his employees, but Smithers insists that Burns retain one human worker to perform maintenance and to serve as a possible scapegoat. Homer becomes the lucky employee, after bursting into Burns' office to thank him for years of service and to criticize him for being cruel to his fellow man. With everyone else at the plant out of work (including Smithers), the town suffers from a 99% unemployment rate.
Homer tries to socialize with the robots, only to be electrically shocked by one who does not understand his "Working hard or hardly working?" joke. Homer steals Mr. Burns' robot manual to change the robot workers' personalities and give them human emotions, and to program them to play baseball with him and Bart. During the baseball game, one robot hits the ball out of bounds. Homer runs backwards into the street to catch it, not noticing that there is a truck approaching. A robot saves his life by walking in front of the truck, then several more robots walk onto the road in front of oncoming cars and trucks. At the robot funeral, Homer tries to propose a toast. But one robot states that the Three Laws of Robotics demands that robots must protect humans; because alcohol is bad for human health, the robot takes away Homer's beer. Annoyed by this, Homer borrows Flanders' drill and gives them "robot lobotomies", but this reprograms the robots to "eliminate all impediments to the plant" by killing Homer.
Homer runs to Mr. Burns' mansion for help, but Mr. Burns makes things worse by releasing his hounds on the robots. One robot easily flings one of the hounds a great distance. The other hounds retreat in fear. When Mr. Burns insults them, the slighted hounds become angry and join the robots. They chase Burns and Homer, who hide inside Mr. Burns' greenhouse. The robots burst in, but Homer and Mr. Burns are saved by the unemployed citizens of Springfield. Burns rehires his former employees as temps. Homer rebuilds one of the robots and takes it on a fishing trip, but the robot becomes annoyed by Homer and self-destructs.