Females of the parasitic wasp Antrocephalus pandens can detect differences in the quality of their hosts (pupae of Corcyra cephalonica, a stored-product moth) and allocate offspring of either sex accordingly. Larger and younger hosts are accepted more often in both dead and live hosts; more female offspring emerge from the perceived better hosts, while more males emerge from the smaller, older ones. These patterns are consistent with a sex allocation strategy by the mother, since females from a given size host tend to be larger than males and larger females produce more eggs. However, when wasps lay their eggs in groups of hosts of different size and age rather than encountering them one at a time, no difference in number or sex ratio of offspring is detected between groups. This result and evidence from the change in offspring sex ratio with female age and with numbers of females foraging on a group of hosts are interpreted and discussed in the context of sex allocation (Charnov 1979) and local mate competition (LMC, Hamilton 1967) theories.