In theory, I agree that the word "secret" can raise a red flag, and I'm normally on board with the "surprises are okay, secrets are not" thinking. But really, I guess it depends on your relationship with the grandparents in question, and your level of trust with them. I trust my mom and my ILs completely, and both have done the, "Don't tell mom you got an extra cookie!" thing, and it hasn't bothered me a bit. For one thing, they've done it right in front of me, within earshot, while looking at me to make sure I heard, so it's obvious that it's a joke. But maybe they've done it when they're alone with my kids too, but it's not at all an authoritative, "You will NOT tell your mother about this extra cookie!" thing, it's a silly, conspiratorial joke, and my kids seem to get that.
Theoretically, I understand crunchy_mommy's point, and agree with a lot of it, but in practice, at least with my kids' grandparents, it just has never raised even the slightest red flag for me to hear them joking around with my kids about stuff like that.