My cockatiel got into the habit of going into tight spaces and getting angry there. She goes into the cupboard, clothes dryer, climbs into any pots or dishes that are around, or just squeezes inbetween my thigh and the arm of the sofa. When she's in closed spaces like this, she gets angry when I put my hand near her, or sometimes even if I just go close to her. She hisses, fans out the tail and sometimes screams at me. As soon as I remove her from the closed space, she's a friendly bird again.
The bird started doing this maybe 5 month ago or so. She's 18 months old now.
We used to put her into the cupboard often before, because she would stay put and play happily with bread tags in there while we were doing something else in the kitchen (usually washing dishes in front of the same cupboard). It's difficult to get some work done with a bird that keeps following you around and always poking her beak into whatever you're doing, so it was convenient.
After she started getting angry in such places, we didn't let her go there any more, and we're trying to not let her into tight spaces in general. Though the cupboard is still her favourite place and she'd try to fly inside whenever it's open. (Second favourite are all kinds of pots or bowls.)
Questions: Why does the bird do this, and in particular, is this usual / common behaviour for cockatiels? Is this some kind of nesting instinct and is it related to sexual behaviour? What can I do to avoid it?
Fortunately the bird can't help obeying the step up command if my voice is insistent enough, so usually I manage to remove her from the cupboard without getting bitten. Once she's out everything's back to normal.