There is an animated social media conversation on this topic going on in a local Facebook group in my Town. We can leave the discussion of these groups and their related analogy to villagers outside the castle with torches and pitchforks for another day.
There are numerous laws that can touch upon this issue of leaving a child under 12 alone in a car. The most specific one is 53-21a which is entitled Leaving child unsupervised in place of public accommodation or motor vehicle. The law states that "any parent, guardian or person having custody or control, or providing supervision, of any child under the age of twelve years who knowingly leaves such child unsupervised in a place of public accommodation or a motor vehicle for a period of time that presents a substantial risk to the child's health or safety, shall be guilty of a class A misdemeanor." Class A misdemeanors are punishable by up to 1 year in jail and/or up to a $2,000 fine. The penalty escalates if between the hours of 8 PM and 6 AM. It then becomes a Class C felony which carries a penalty of up to 10 years jail and/or up to a $10,000 fine. Extreme situations may also violate 53-21 which is Risk of Injury to a Minor and involves any child under 16 year of age which is also a Class C felony. Reckless Endangerment 1st (53a-63) and 2nd degree (53a-64) may also apply.
There is absolutely no recognized defense that the child in the car was within eye sight of the responsible person. None. However, leaving the child alone in the car is only the first prong of the offense and does not in and of itself constitute a violation. The child must also be at a "substantial risk to their health or safety." The statute is usually applied in clear case situations. Most reported cases involve 10 minutes or more and/or have a weather component to it. Clearly an argument exists that a person within a certain number of feet of the child, within eye contact, for only a few minutes has not put that child at a substantial risk to its health or safety absent some other factor. But, as Dirty Harry said "are you feeling lucky today?" If you are then take the chance that the cop called to your car agrees with you. If you guessed wrong then you may be arrested at the scene, the child may go into the care of DC&F if a relative cannot be reached, DC&F will get a report of neglect and need to investigate, you may be booked, processed and released at station, given a court date, and very likely be publicly ridiculed and and shamed on social media. So, tell me, are you still feeling lucky?
As a father of 4 sons I understand the temptation to leave a sleeping kid in a heated car on a cold day, or any other seemingly safe situation. I just don't think it is worth the risk. Don't leave your future at the discretion of the responding officer. The officer will do what they think is the right thing under the circumstances, but they often err on side of caution and make the arrest when in doubt. Avoid the risk. Take the kid with you.