As discussed yesterday, R' Chaim questioned the gemara's hava amina that the pasuk's emphasis on "ben" sorer u'moreh teaches that a child under bar-mitzvah can be judged. Since a minor cannot server as a defandant in Beis Din, how could witnesses testify againt him or the court prosecute? R' Chaim answered that ben sorer u'moreh is different than other cases because the ben sorer u'moreh is not punished for what he has done, but rather for who he is -- it is the character of the ben sorer u'moreh which the witnesses establish, and the suspicion of potential future guilt for which he is killed. In this unique context even a minor may be tried and judged.
Many achronim (see Margolyas haYam citing the Rogatchover, Avi Ezri Hil. Mamrim) offer a far simpler answer to R' Chaim's question. The chiddush of the din of ben sorer u'moreh is not that a minor may be punished, but rather that in this context a 12 year old is no longer considered a minor!
Some other examples of a similar phenomena:
1) Kiddushin 46 Rav Huna's opinion is that a 12 year old who is viewed as halachically capable to making nedarim would receive malkos for eating a food that he made hekdesh. Even though one cannot testify against as minor or judge a minor, as R' Chaim noted, apparently since in the context of nedarim a 12 year old has the same rights as an adult he would be subject to the same penalties as an adult. In other words, a 12 year old who makes a neder is not viewed as a minor who has the limited capability of making a vow, but rather is viewed in the context of nedarim as a full adult.
1) Kiddushin 19a the gemara darshens from the word "ish" that a minor cannot be punished for adultery. Even though, as Tosfos notes, a minor is always exempt from malkos, and as R' Chaim would note it is impossible to testify against a minor or judge a minor, in this case a special derasha in needed to exempt a minor. Tosfos explains that since the adult woman having the illicit relationship would be killed, there is a hava amina that the minor who is an adulterer would be killed as well. In other words, the hava amina exists that in the context of adultery we should treat a minor as a full adult.