IK/FK problem with robotic hands

Hi fellas. Newbie with Blender here. (First attempt for me making a topic here too.) I got a little rigging issue that’s probably obvious when a solution is known, but I personally just can’t seem to wrap my brain around it.

I’m rigging a robot character that has dome-shaped hands, which need to rotate around the palm rather than the wrist. I made the bones and it works fine with FK, but IK is where the issue lies:

In order to get the rotation where I wanted it, I reversed the last bone. But when I use IK, the arm bones are desperately trying to reach out to the palm, before I even move the hand bone, rather than keep the original distance. Only difference between the IK bones and the other bones is that I unparented the IK hand from the IK arm, because it was creating weird rotations when trying to move the hand. I assume that’s where the issue lies.

In Edit mode, everything looks fine.
But in pose, IK creates weird rotations on the main bones it’s constrained to.

What would be a good solution to make the FK/IK work as intended?

The IK constraint always wants to close the distance between the constrained bone and its target, so this will cause issues if the target’s initial position is away from the bone. As a general rule, it’s a bad sign if any bones in a rig at rest appear to “snap” or change at all when you enable their constraints.

The solution is to use a different target bone which is already at the tip of the IK bone. In edit mode, extrude a bone from the IK bone, separate it from the chain (while leaving its location the same), and parent it to the hand bone. Then use THAT as the target.

It works now!
Thank you for the advice!