Environmental effects on sex allocation are common, yet the evolutionary significance of these effects remains poorly understood. Environmental effects might influence parents, such that their condition directly influences sex allocation by altering the relative benefits of producing sons versus daughters. Alternatively, the environment might influence the offspring themselves, such that the conditions they find themselves in influence their contribution to parental fitness. In both cases, parents might be selected to bias their sex ratio according to the prevailing environmental conditions. Here, we consider sex allocation in the citrus mealybug Planococcus citri, a species with an unusual genetic system in which paternal genes are lost from the germline in males. We test environmental factors that may influence either female condition directly (rearing temperature and food restriction) or that may be used as cues of the future environment (age at mating). Using cytological techniques to obtain primary sex ratios, we show that high temperature, older age at mating and starvation all affect sex allocation, resulting in female-biased sex ratios. However, the effect of temperature is rather weak, and food restriction appears to be strongly associated with reduced longevity and a truncation of the usual schedule of male and offspring production across a female's reproductive lifetime. Instead, facultative sex allocation seems most convincingly affected by age at mating, supporting previous work that suggests that social interactions experienced by adult P. citri females are used when allocating sex. Our results highlight that, even within one species, different aspects of the environment may have conflicting effects on sex allocation.