I'd say around 8 to 10 years old.
First off, any city kids will die. However, in rural area's, especially in poor countries, there's plenty kids working on their parent's farm who know enough about crop rotation and the like to run it, if they keep working. Why the poor countries ? Because in rich countries the farmers are a lot more dependent on technologies, and in poor countries they're more self-sufficient. This'll be enough to get self-sufficient. You aren't quite back to stone age - they'll know basics of both agriculture and husbandry, which will be enough. Reboots will take ages as all many of the wealthy countries, where knowledge is concentrated, will be wiped out completely. The groups of boy scouts might take a bit longer to die.
Any reboot is probably dependent on low-population-density countries that are still rich and well-educated. For example, kids in certain parts of norway learn basic survival out in the wilds, while also being taught normally in schools. These could be a focus of a reboot, if enough knowledge is preserved in books they can access.
Note that every digital dependent storage will most likely be wiped out completely.
You'll probably also have traumatized every single one of them. But humanity is tough, and children can be better at adaptation than you'd think. After a year or five, it's just the way life is (and they'll start marrying again). They'll almost have forgotten the world used to be different. Most likely, older siblings will try and take care of their younger siblings, so those probably won't all die, but the lower you get in age the higher the mortality goes.
Right away, civilization will fall down close to stone age levels. Groups will either go agricultural, hunter-gatherer or animal-herding. Or some combination of those. They'll lose global communication as soon as automatic systems start failing. 998
Electricity will fall out, and that's that. From that moment on, every group is on itself. Oh, yeah. They'll form groups, or tribes, before the week is over. Most of the ones fated to die as well.
In a year of five, the survivors will have a more or less stable life. This means they might start attempting to harvest technology. Expect the first new children to be born around this time - about 12 is a pretty normal age to be fertile, and they'll start it right away. Perhaps there are exceptions before, but as a rule humans are conditioned to start families by choice when they feel more or less stable and capable of feeding the offspring. This goes for most animals. 5 Years after the collapse sounds good to feel stable again. At this moment, basically everyone will have only distant memories of the previous world, or none at all.
Note that there will be all weird kinds of religion or random beliefs popping up left, right and center. Humans look for structure in the world. Also, there are a lot of books kids could read, but at this time, the current world might be a dream for all most know. They won't be able to tell the difference anymore between a lot of science or science fiction - someone who finds a star trek book might consider it historical, and therefore conclude that they are are plenty other worlds containing humans out there. Or people read <PERSON> and attempt magic. At this point, high school educational material should be easy to find, and this may help them.
After about 20 years, you're probably in medieval level society again, at least the more developed parts of the world. From there up, it depends on how smart the ones are that try and harvest knowledge left behind, and how accessible that is.
College level educational books will still be common around this period, and most science up to about 50 years before collapse will probably be preserved in one form or another inside those. 998