In 244, the officials Deng Yang and Li Sheng advised Cao Shuang to launch a military campaign against Wei's rival state Shu to boost his fame and authority in Wei. Sima Yi strongly objected to this idea, but Cao Shuang ignored him and proceeded with the campaign. He suffered a defeat at the Battle of Xingshi in April 244 against Shu forces. Sima Yi sent a letter to Xiahou Xuan reprimanding their reckless actions as they could lead to utter destruction, referring to historical precedent by stating how Cao Cao previously almost suffered a total defeat in the struggle against Liu Bei for Hanzhong, and also mentioning the fact that the Shu forces were already occupying Mount Xingshi (興勢山; situated north of present-day Yang County, Shaanxi), and, if they personally fail to seize control of the area, could end up having their retreat route cut off and their forces destroyed. Xiahou Xuan subsequently grew anxious and advised Cao Shuang to lead his troops back, which he eventually resorted to by June or July of the same year, further incurring losses during his retreat.