The Bodhisatta was once a trader's son in Kāsi. One day during their travels father and son were obliged to take lodging in a hall haunted by a yakkha. In the case of persons occupying this hall, if one of them should happen to sneeze and the other failed, thereupon, to wish him long life, the yakkha was allowed to eat them. This boon had been granted him in return for twelve years' services to Vessavana. The two travellers from Kāsi took up their abode in the hall for one night, during which the father sneezed. The son, knowing nothing of his danger, said nothing, but on seeing the yakkha preparing to eat him, he guessed the reason and hastened to wish his father long life. The father acted likewise, and the yakkha was foiled in his attempt on their lives. The Bodhisatta, having heard the yakkha's story, established him in the five precepts. The story became known, and the Bodhisatta was given the post of general, while the yakkha was made tax-gatherer. In the story the Bodhisatta addresses his father as Gagga.
Once, when the Buddha was preaching, he sneezed, and all around him shouted "Long Life," thus interrupting his sermon. The Buddha told them that the custom was superstitious, and forbade them to follow it. On their obeying him, the common people blamed them for their lack of good manners. The Buddha, thereupon, withdrew the injunction and related this story to account for the origin of the custom. (J.ii.15f.; the introductory story is found in Vin.ii.140).
Gagga is identified with Mahā Kassapa. J.ii.17.