My question relates to the stereotypical example for understanding the first and second laws: an isolated system filled with a gas of non-interacting molecules with constant ($E$,$V$,$N$) has two subsystems that can only exchange energy.
There is entropy production associated with the energetic exchange. Since entropy is additive: $d S=d S_1 + d S_2=d Q(\frac{1}{T_{cold}}-\frac{1}{T_{hot}})>0$. Where $d S$ is the change in entropy of the total system.
I don't understand how this is coherent with the first principle applied to the total system. Naively, I would say that $dU=TdS=0$ (since the system is energetically isolated with the rest of the universe). So $dS=0$.
P.D.: Despite having read several posts related to this, I didn't get the feeling that my specific question was answered. (e.g. Why can the entropy of an isolated system increase?, entropy in isolated system).
Edit 1: Trying to remove some ambiguities, I was not thinking in thermal reservoirs but on two separate halves of an isolated system that are allowed to exchange energy. In the beginning, both parts have well-defined temperatures $ T_ {cold} $ and $ T_ {hot} $. The expected final state of the system is an equilibrium state in which the whole system has the same temperature ($ T = T_1 = T_2 $).