An adult female lays eggs in a walnut husk, and the hatched larvae (maggots) feed on husk tissue.
This feeding causes the fleshy skin to decay, staining the nutshell.
In late fall the maggots drop to the soil and pupate for 3 or 4 years before metamorphosing into adult.