I would say to always approach the gate agent and let them know that you have a 2 year old. They don't really look at the age of the person traveling with you so they won't know until you tell them. In my view, this is helpful to them so they can, for example, ask you in advance if you are willing to separate in case there are fewer seats than nonrevs listed. Even now, when traveling alone, I still approach them when I first arrive at the gate to let them know that I am there and then I don't approach the agent again unless they call my name.