This question already has an answer here:
Do we have a word or phrase for this? For example, we could have two good friends: Person A and Person B. In a conversation, after a certain phrase is said, both say the same thing at once, signifying that they both thought about the same thing/shared the same feelings. It would essentially be a way of "knowing what each other is thinking".