I have overpaid my taxes several times due to clerical errors, and each time the IRS sent me a letter explaining what happened and a check for the overpaid amount, plus interest. One time I forgot to deposit the check, and after waiting a year they automatically sent me a replacement along with a reminder of why it was they owed me money. My general impression is that they’re tedious and bureaucratic, but scrupulously inclined towards accuracy in both directions.