First of all, I can't seem to get a symmetrical sin wave going. The interpolation for keyframes should be able to cycle when cycling is on, but I guess it doesn't. Here's an image of a "bad curve" where I tried to make it symmetrical in a 40-frame animation.

To fix it, I create a keyframe one frame before the cycling one (frame 39) and play around with the values to smooth it out. The result is not something symmetrical, but at least it's not really noticeable in practice.

Next is really the meat of the problem. Once I get the curve looking smooth in the timeline, there's a weird "catching" look to the animation right when it loops. It drives me crazy. I found out that the frame after the cycling frame that appears smooth on the curve actually has a different value than frame 1. So to fix the "catching," I copy the value from the frame after the cycling frame (for me, frame 41) to frame 1. Here is a before-and-after of the two curves multiplied on top of each other.

As you can see, the bottom of the curve after the animation ends is a full frame off from the original. That's why I got the catching look, which can look really bad when you have a chain of bones and the catching is going on in 3 bones in a row.
Why does this happen? Well the root of the bug is this: the curve at the frame after the cycling keyframe is matched up to frame 2, instead of frame 1 like it should be. The following two images have frame 41 shown with frame 1 and frame 2 previewed, respectively.


The second one matches up, which is frame 2. So the fix for the bug would be to make my frame 41 match up with frame 1. This might even fix the first problem I'm showing.
But until then, make the curve look smooth, then copy the value from the frame after the cycling keyframe and paste that into frame 1.