I saw the following question at mathstackexchang < https://math.stackexchange.com/questions/2282194/when-an-ideal-is-locally-comaximal-with-idempotents>. It seems to be a nice question and I need it in my research. I want to know is it true? It is clearly true for indecomposable rings.
Let $R$ be a commutative ring with identity, and let for an ideal $A$ of $R$, $\mathrm{Id}(A)$ be the ideal of $R$ generated by all idempotent elements of $A$. Now let $I$ be an ideal of $R$ such that for each prime ideal (or primary ideal) $P$ of $R$ we have $I\subseteq \mathrm{Id}(P)$ or there exists $a^2=a\in P$ with $a-1\in I$. Show that $I=0$.