In all actions to recover the forfeiture annexed to any articles of agreement, covenant, bond, or other specialty, wherein the forfeiture, breach, or nonperformance appears by default or confession of the defendant, the court shall render judgment for the plaintiff for such amount as is due. If the sum is uncertain, it shall, upon request of either party, be assessed by a jury.