Energy transfer will stop when both objects reach equilibrium.
If you leave a mug of hot coffee in the kitchen, energy as heat from the coffee will escape into the environment. This process continues until both objects reach the same temperature. In this case, the coffee will stop transferring more energy at room temperature.
While it is true the coffee does raise the temperature of the room in part, but this change in temperature is often negligible and besides.