In a the construction "All X but Y including W did Z", is it understood as W did Z, or W didn't do Z?
Example: "All kids but 2 including Bob got a candy". Did Bob get a candy?
In a the construction "All X but Y including W did Z", is it understood as W did Z, or W didn't do Z?
Example: "All kids but 2 including Bob got a candy". Did Bob get a candy?
As written, the sentence is ambiguous.
Different people could easily make arguments that Bob is in either the group that did or did not get a candy.
To word this in a less ambiguous way you could do one of the following:
All [of the] kids, including Bob, but two got a candy.
All [of the] kids got a candy, including Bob, but two [did not].
You could possibly also go with:
All [of the] kids but two got a candy, including Bob.
This version could still be slightly ambiguous but it's much more likely to include Bob in the group who did get a candy.
All [of the] kids but two, Bob and and another kid, got a candy.
All [of the] kids got a candy except for two, Bob and another kid.
All [of the] kids except for two, Bob and another kid, got a candy.
For some reason, enumerating both kids, even if one doesn't get named specifically, makes it much more clear that you're describing the two who did not get candies.
You could also consider using "most" instead of "all"... since technically, not all of the kids got candies... though we regularly use "all" and then add exceptions, so it's not uncommon.
Most of the kids got a candy; only two did not, Bob and another kid.
Also, I do recommend adding [of the] unless you're writing logical proofs for a "logic puzzle" sort of thing.
OALD gives two entries for 'all but'. Entry #2 says:
'all but' - Everything or everyone except something/somebody.
Looking at your example sentence:
All kids but 2 including Bob got a candy.
It is difficult to say whether or not Bob get a candy, but then here, specifically two (kids) are mentioned, so we can assume that two kids including Bob did not get a candy!
The sentence, as it is written, implies that Bob didn't get a candy.
Although, the commas could be used to make it clearer or less ambiguous.