Parasitoid wasps are convenient subjects for testing sex allocation theory. However, their intricate life histories are often insufficiently captured in simple analytical models. In the polyembryonic wasp Copidosoma koehleri, a clone of genetically identical offspring develops from each egg. Male clones contain fewer individuals than female clones. Some female larvae develop into soldiers that kill within-host competitors, while males do not form soldiers. These features complicate the prediction of Copidosoma's sex allocation. We developed an individual-based simulation model, where numerous random starting strategies compete and recombine until a single stable sex allocation evolves. Life-history parameter values (e.g., fecundity, clone-sizes, larval survival) are estimated from experimental data. The model predicts a male-biased sex allocation, which becomes more extreme as the probability of superparasitism (hosts parasitized more than once) increases. To test this prediction, we reared adult parasitoids at either low or high density, mated them, and presented them with unlimited hosts. As predicted, wasps produced more sons than daughters in all treatments. Males reared at high density (a potential cue for superparasitism) produced a higher male bias in their offspring than low-density males. Unexpectedly, female density did not affect offspring sex ratios. We discuss possible mechanisms for paternal control over offspring sex.