Emperor Gaozu, realizing the situation was serious, requested opinions from Pei, Xiao, and Chen. Xiao and Chen suggested that he create Li Shimin crown prince, and he agreed to do so. As Li Jiancheng's and Li Yuanji's forces were then engaging Li Shimin's forces, Yuchi requested that Emperor Gaozu order that the battling stop and that all armies fall under Li Shimin's command. Emperor Gaozu agreed. When Li Shimin's subordinates wanted to massacre Li Jiancheng's and Li Yuanji's associates and confiscate their wealth, Yuchi earnestly opposed, stating that this would lead to more turmoil, and Li Shimin agreed. Subsequently, Li Shimin awarded Li Yuanji's treasures to Yuchi and promoted him to a major general title.