by his son Li Shimin in 626 (after Li Shimin ambushed and killed Li Jiancheng and another brother Li Yuanji and then effectively forced Emperor Gaozu to yield the throne to him), Yang Shidao was made Shizhong (侍中) – the head of the examination bureau of government (門下省, Menxia Sheng) and a post considered one for a chancellor. He was considered careful in his actions, not leaking any words on the important matters of state. He once said, "When I was young, I read the Book of Han, and I saw that Kong Guang [(孔光, a prime minister during the reigns of Emperor Cheng of Han and Emperor Ai of Han)] was not even willing to speak about the trees in the greenhouses inside the palace. I admired that, and I want to be like that." Whenever he left imperial gatherings, he would invite talented people to meet at his mansion to discuss literature, and the gatherings at his house were considered important literary events. He was also said to be talented at calligraphy. In 639, he became Zhongshu Ling (中書令), the head of the legislative bureau and also considered a post for a chancellor. In 643, a plot centering the crown prince Li Chengqian was discovered where Li Chengqian considered overthrowing his father. Yang's stepson Zhao Jie (趙節), a son of Princess Guiyang (now titled Princess Changguang) by her deceased husband Zhao Cijing (趙慈景)) was one of the co-conspirators. When Yang was involved in the investigation of the case, he tried to intercede on Zhao Jie's behalf with Emperor Taizong, and this displeased Emperor Taizong. Yang was therefore demoted to the post of minister of civil service affairs, no longer a chancellor. Zhao Jie was executed. (Emperor Taizong later personally visited Princess Changguang to apologize for the fact that he could not spare Zhao Jie, but stated that he did so because he had to be fair in governing the state.) Because Yang was born out of a very honored lineage, he was well-acquainted with the nobles. However, because of this, he did not promote people that he knew well to avoid appearance of conflict of interest. This, in turn, however, brought criticism that he was not in fact being fair, as he was not promoting that he knew to be capable. In 644, when Emperor Taizong, at an imperial gathering, stated to his key officials their strengths and