In the Breaking Bad episode "Half Measure" (S03E12) Jesse tries to kill the two dealers who killed Combo using Andrea's little brother Tomas. But as soon as Gus gets behind this he intervenes and apparently only by Walt's pleading lets Jesse live. He tries to arrange peace between Jesse and the dealers to avoid any further trouble. And as a compromise he tells the dealers
No more kids.
when Jesse tells him about Tomas (though, it's hard to imagine Gus didn't know about the usage of kids as subordinates, let alone care about it at all). And so far so good the peace seems settled.
But then suddenly Tomas ends up killed and I can't wrap my head around why (other than to further the story by making things escalate). Sure, for the dealers it might be an easy way to dispose of him, now that they're told "no more kids", but I don't think they would hazard such an action without permission from Gus. And I can't see what Gus really gained from Tomas' death. Even as an act of defiance to show Jesse who's the boss it doesn't make so much sense, seeing that he was quite interested in the "peace treaty" to avoid further trouble and he knew Jesse's temper and that this was bound to cause trouble once Jesse learns about it. If he really wanted the situation to escalate and get rid of Walt and Jesse, he could have offed them a lot easier and more unexpectedly. Or did he just hope for Walt to ditch Jesse once he goes postal, underestimating their bond? Did I miss anything relevant that may help to understand who ultimately made the plan to kill Tomas and why?