Koun Ejō (孤雲懐奘?) was the second patriarch of the Japanese Sōtō school of Zen Buddhism who lived during the Kamakura period. He was initially a disciple of the short-lived Darumashū sect of Japanese Zen founded by Nōnin, but later studied and received dharma transmission under the Sōtō schools founder Dōgen Today Ejō is considered Dōgen's spiritual successor by all existing branches of the Sōtō school. He is remembered today primarily as the author of the Shōbōgenzō Zuimonki, a collection of informal talks by Dōgen which Ejō recorded throughout his discipleship. He is also featured prominently in the Denkoroku, the first major piece of scripture produced in the Sōtō school after Dōgen, with his transmission story serving as the final koan. After Dōgen's death, Ejō struggled to maintain leadership of the new Eihei-ji monastery, due in part to his lack of training in China that prevented him from completing the temple as a Chinese-style meditation hall, as well as unfamiliarity with Chinese-style monastic practices. He gave dharma transmission to Jakuen, Gikai, Gien and Giin, all of whom were originally students of Dōgen, but his failure to designate a clear heir himself led to a power struggle known as the sandai sōron that temporarily split the community.