More than just a twig, the photos below show the larval case of Hemibella heliotricha, a moth of the very large family Oecophoridae. There are other members of the genus on the mainland. I noticed many of these larvae last August on one particular tree. I've been watching closely for the last few weeks and finally spotted one on the same tree today.
The larvae of the Genus hollow out twigs to make a larval case in which they gain protection. I'm always impressed by the straightness off the cross cut and the neatness of the round hole. They feed on Eucalyptus leaves. You can see the holes in the leaf where it has been feeding. Other parts of the leaf have only had the surface grazed. The caterpillar will use successively larger twigs eventually pupating within.
They can attach the twig to a leaf or branch using silk. Using a twig also offers pretty good camouflage but their habit of attaching themselves at right angles to a surface makes them a little easier to spot once you know what you're looking for.
(Click photos for larger versions)