There may not a message going across the screen of the Defensive pact.But I am pretty sure I have seen the AI wait till my defense pacts are up to attack me.That is why I like to stagger them .I try to stagger them about ten turns apart to give me a little breathing room to think of my next moves.
That's more an issue where AI is aware of things players are not. Like the fact when they recommend locations for new cities they take into account resources not yet revealed (so AI tend to settle cities in good spots for the future where players can't see those hidden resources when making their choices). AI also knows your pointy stick rating without having a scout viewing all your units while players have to "guesstimate" what they can't see (like promotions) unless said AI is first or last in Demographics or you've just gotten one of the turn popups regarding it.
Players don't get messages when other AI form Defensive Pacts (and I'm not sure they show up on Diplomatic Overview either).