After the founding of the PRC in October 1949 and until the outbreak of the Cultural Revolution in 1966, Yang Shangkun was one of very few CCP leaders who worked closely with Mao Zedong at Zhongnanhai on a daily basis. As the Director of the General Office and Secretary–General of the CMC, he oversaw much of the actual day-to-day work of most party activities and military affairs. On the eve of the Cultural Revolution Yang was identified as a supporter of Liu Shaoqi and Deng Xiaoping, and was purged as a counter-revolutionary. After being ejected from the Communist Party and removed from all positions, Yang was persecuted by Red Guards, who accused Yang of planting a covert listening device to spy on Mao, the same accusation shared by Deng Xiaoping.