 At the suggestion of the imperial eunuch sent to monitor his army, Zhai Wenxiu (), he ordered them to report to the imperial guards at the capital Chang'an to serve as imperial guard officers, but as soon as they left Bin Prefecture he had them arrested and executed, blaming them for a defeat that Hun suffered when commanding them in 773.In 780, after a plan by the powerful chancellor Yang Yan to build forts in the no man's land between Tang and Tibetan territory was opposed by Duan Xiushi the military governor of Jingyuan Circuit (涇原, headquartered in modern Pingliang, Gansu), Yang persuaded Emperor Dezong to strip Duan of his command and recall him.Emperor Dezong had Li assume the command of Jingyuan Circuit as well as Binning Circuit and moved his command to Jingyuan's capital Yuan Prefecture ().