Xanthocryptus novozealandicus
These handsome insects have black and white bodies with orange and black legs. The antennae are mostly black with a distinctive white section starting about halfway along.
These wasps are named for their ability to parasitise grubs of the horticulturally significant pest, the lemon tree borer beetle (Oemona hirta), with one Auckland-based study suggesting between 10-20% of lemon tree borer larvae may be affected by the parasite at any one time. Despite the name, this wasp is not restricted to attacking larvae of the lemon tree borer and will lay eggs on other kinds of longhorn beetle grubs (family Cermambycidae).
Beetle grubs are apparently located through a combination of visual inspection of wood followed by exploration with the antenna, with the white portions of the antenna being used to touch the wood. Once a grub is located, the wasp uses her ovipositor to push into the wood and leaves and egg on her target. A larva emerges from the egg and feeds on the insides of the beetle grub host.
This wasp is found in both the North and South Islands, as well as Australia and New Guinea. They are most often seen between spring and autumn.
Check these links for more info on the Lemon Tree Borer Wasp in NZ
iNaturalist.nz: Observations of Xanthocryptus novozealandicus
Wikipedia: Information on Xanthocryptus novozealandicus
ECOLOGY NGĀTAHI: Aliens in Our Backyard: Parasitoid Wasps (and How to Catch Them) (2016)