Yang Zhao died in 606. However, Emperor Yang did not create Yang You or either of his brothers crown prince to replace Yang Zhao, leaving matters ambiguous as to whether one of them, or Yang Zhao's younger brother Yang Jian the Prince of Qi, would inherit the throne eventually. He created the three sons of Yang Zhao imperial princes, and Yang You received the title of Prince of Dai. As Emperor Yang did not often stay in the capital Chang'an, starting 613, he made the eight-year-old Yang You nominally in charge of Chang'an, although he left the official Wei Wensheng () in actual charge of the city. Later that year, when the general Yang Xuangan rebelled and attacked the eastern capital Luoyang, it was Wei who led troops from Chang'an to aid Luoyang's defenses.