In the original Barton publication[3] the reaction was optimized by using a strong guanidine base, the inverse addition of the hydrazone to an iodine solution, and by exclusion of water.
In the next step, iodine reacts as an electrophile; displacement of nitrogen then generates an iodocarbonium ion.
When the hydrazone 1 in scheme 5 is reacted with iodine and triethylamine in toluene, the expected reaction product is not the di-iodide 10 through path B in a free radical mechanism.
In path B another equivalent of iodine reacts to the azo double bond followed by loss of HI and formation of 6.
The actual process taking place is path A with elimination of HI to the diazo compound 4 followed by a diazoalkane 1,3-dipolar cycloaddition to the pyrazoline 5 in 85% yield.