The gemara says about King Yoshiyahu that he repented for all of the cases he might have mistakenly judged from age 8. 8 is not yet Bar-Mitzvah.....
The Rema says that even though a kotton is not OBLIGATED to do teshuva for all the sins he committed but it is proper for him to take upon himself teshuva for sins of youth. The Gra cites our gemara as a source.
There is a huge discussion on the Achronim if the sin of a kotton is actually considered a sin. Maybe since he is not obligated in mitzvos yet, his aveiros don't count. There is a gemara in Sanhedrin [55b] that says that a kotton CAN do an aveira just Hashem doesn't punish him.
Our gemara would seem to prove this as well. Here is a broad discussion of the topic.