This is very common for a parrot to be aggressive when they are higher than you are. I honestly don’t let my birds play on top of their cages for that reason. They are with me or on a playstand. You might try stick training him, which is basically teaching him to step up on a stick. This is generally the best way to handle this behavior. You can try training him to go into the cage himself by putting a special treat in there. But this is not as reliable. With some birds it is mainly a big bluff and if you move your hand to their chest without hesitating and say step up, they will do it without thinking about it. But it’s natural to flinch when they bite at you and you can teach him a bad habit if you back off instead of following through. So again, having him step up on a perch is the easiest and pain free method for both of you. Or, don’t let him play up there and get a playstand instead.
Thank you for asking Lafeber,