Holding a child during Shemoneh Esrei[1]
It is forbidden to hold a child in one’s arms during Shemoneh Esrei, or to seat him directly before oneself, as this distracts the person and diminishes proper kavanah. This prohibition is similar to the general restriction against holding objects during prayer, as one’s mind is occupied with guarding or attending to the item, and the same concern applies to a child. Likewise, one should not carry a child on his back during Shemoneh Esrei. However, if one did so and already completed the prayer, he is not required to repeat it. A practical question may arise in a case where a small child is crying intensely and cannot be calmed unless held, and the time for prayer is passing. If leaving the child crying will prevent proper concentration, or disturb the congregation, it requires further consideration whether one may hold the child and pray, or whether it is preferable not to pray at that time.
[1] Birkeiy Yosef 96:1 in name of Mahariy Molko; M”B 98:3; Mishnas Yosef 10:22; Chinuch Habanim Kehilchaso Chapter 12:17