In the cold war, how did commanders of US and Soviet ballistic missile submarines know if they were being followed by the other side's attack subs?

Now I know the cold war involved a lot of cat and mouse stuff as well as both sides following each other's boomers with attack subs, I guess the question is, seeing as an attack sub would likely recieve orders to torpedo an opposing boomer should somebody start shooting icbms off, either in a first strike or retaliation, how would boomer commanders, knowing the importance of stealth and the other side not knowing where they are ensure that they haven't picked up a tail and are not being followed by subs from the other side that would recieve orders to torpedo them if things were to go hot?

In the cold war, how did commanders of US and Soviet ballistic missile submarines know if they were being followed by the other side's attack subs?
Post Opinion