Reaction of an electrode
The real reaction is $\ce{Ag+ + e- -&gt; Ag}$ for both cases. Equation written in this way, ${E^0}$ will be equal to the reduction potential of Ag(I) in its 1 M solution.

If it is written as $\ce{AgI + e- -&gt; Ag + I-}$, then ${E^0}$ will be equal to the reduction potential of Ag(I) in 1 M $\ce{I-}$ solution -or in other terms in ${K_{sp}(AgI)}$ Molar Ag(I). solution

Hence, technically, $\ce{Ag+ + e- -&gt; Ag}$ is same with $\ce{AgI + e- -&gt; Ag + I-}$. Latter is more descriptive and practically more relevant, however, because the presence of $\ce{I- /Cl-}$ ions in the medium limits the amount of $\ce{Ag+}$ cations via ${K_{sp}}$ and the notation readily implies this.