Ren Huan
Shortly after, Li Jiji began to lead his army back toward the Later Tang capital Luoyang. However, on the way, the general Li Shaochen rebelled. Li Jiji sent the civilian official Ren Huan, who, despite his civilian background, was capable in military matters, against Li Shaochen. Zhang advised Ren to first send the weakest among his soldiers against Li Shaochen, so that Li Shaochen would be enticed into attacking him, and then lay a trap for Li Shaochen. Ren followed the advice and subsequently defeated Li Shaochen, forcing Li Shaochen to flee to Han Prefecture (漢州, in modern Deyang, Sichuan) and try to defend it. Ren subsequently captured the city and took Li Shaochen captive. Li Cunxu then issued an edict ordering Li Shaochen's death, but the eunuch monitor of Li Jiji's army, Li Congxi (), wanted to keep Li Shaochen alive so that he could think of a way to take credit for the victory and deny Ren the credit. Ren hesitated. Zhang spoke to him, arguing that Li Shaochen's crime deserved death, that Li Shaochen would still constitute a potential threat if left alive, and that, in any case, he should not disobey an imperial edict; Zhang also stated that he would execute Li Shaochen himself if Ren did not. Ren agreed (albeit hesitantly) and put Li Shaochen to death.