Intersex babies

When a baby is born, the next question usually is: Is it a boy or a girl?
What if the answer is unclear? That is the crux of the issue with intersex babies.
Intersex babies have a condition where there is a discrepancy between the external genitals and the internal genitals  (the testes and ovaries) of the baby. It was formerly called hermaphroditism but is presently referred to as disorders of sex development (DSDs).
In newborn boys or girls, some of the causes are:
Certain medicines (e.g testosterone) the mother takes or is exposed to during pregnancy Congenital adrenal hyperplasia in the baby or the mother- the most common cause of DSD.Other medical conditions in the mother (such as tumors of the ovaries or adrenal glands that release male hormones)  etc
In the past, surgical genital reconstruction was widely applied to infants with DSD, but the growing understanding of the psychological and social implications of gender assignment is making medical teams and the families affected reconsider gender assignment surgery.
What do you think: Should surgery be delayed till the child can give consent?