In several laboratory experiments scrub jays, relatives of the blue jay, hid their extra food more cautiously when other jays were around. In fact, if another scrub jay were visible when the first jay buried its food, the first jay was more likely to dig up the food later and rebury it in another location.
Complicated Bird Behavior
This shows that some birds are capable of more complicated behavior than previously thought. And in fact, because of this behavior, scrub jays were recently studied to confirm that it's possible for birds to have episodic memories.
Scrub jays are notorious for stealing food from each other, so the fact they behave more cautiously when other scrub jays are present might mean that they're able to speculate about the future behavior of their observers. Birds from species not known for thievery don't show the same reburying behavior.
When scientists allowed some scrub jays to dig up another jay's food after seeing where it was buried, the birds allowed to steal were more likely to rebury their own food later when given the chance.
"Birds With A Criminal Past Hide Food Well" (Science News)