Thank you for sharing this. It reminds me of a few of my own experiences.
Far from "stupid," your concern for "the fate of the cookies" in its own way reflects credit on your character.
I speculate complex mental-emotional dynamics are behind what you felt.
__________________
My dog

mastered the "fetch" command. He would communicate he wanted something, and I would fetch it.