The first agent made a mistake, but you failed to correct the error when you saw it and eventually it caught up with you.
Yes, the first agent wrongly cancelled the tickets and failed to cancel the reservation. Stuff happens.
When you saw the miles back in your account it meant that you were holding a ticket which hadn't been paid for. Eventually an audit sweep caught the unpaid ticket and cancelled it.
Consider yourself very lucky. If the award space was no longer available on CX, there is nothing AA could have done to get the space back if CX had not been willing to help.
For others, when you see a mistake in your favor, the temptation is to let sleeping dogs lie. But, these things are audited and it's beyond unlikely that you fly for free. This mess could have been avoided back in April by calling in and noting what had happened.