I have a 5 y/o female who hates my hands but is like a piece of velcro on my shoulder and arm much of the time when she's out. She flies over of her own will and hangs out, loves riding around, tries to eat my food, will eat my hair, snuggle in it sometimes, etc. She sounds lovely, right? Yeah, she's not. At any given moment she's likely to bite! Sometimes there are warnings like certain noises she makes first. But I've learned that many times her biting me, which usually draws blood, is actually displaced aggression. Something around is aggravating her, and she takes it out on the nearest thing, which is wherever she's perching. She seems very sensitive to her surroundings, very protective, so the things that bother her are not always obvious to me. It can be something as simple as a loud or obnoxious noise from the tv.
Another time she will do this biting (usually no blood for these, just sharp nips): when she thinks she's warning me of some perceived danger.
Despite having zero nesty things in her cage, she is much much much worse about this behavior during late winter all through the spring! It is much longer than "a couple weeks" and is very trying. Hopefully yours will not be so bad as mine once she matures. For several months this year I could not allow her to hang out on me at all because of the biting. But then suddenly boom she was back to her more normal self and she's allowed on me once again.
I hope my girl is an extreme example.