They meet a civilisation who clame to be Ancients - Ancients who don't want to ascend - or maybe they can't. They had a falling out long ago with the other Ancients over how to deal with the Wraith. They have a plan to destroy the Wraith, but they aren't telling it. The team is suspicious; they don't seem like Ancients. Maybe they just found the city, in the same way thay they found Atlantis.
As they are about to leave they are captured. Seemingly, they escape to Atlantis and then tens of Wraith ships turn up. They know exactly how to disable and destroy the defences. Earth s dialled and as they are about to escape, Shepard wakes up. Something similiar to a Replicator is reading his mind. The others have had similar dreams.
These are not the same as the Milky Way Replicators. They result from the creation of nanobots by the Ancients to fight the Wraith. They have now evolved as far as the can, but want to emulate their creators and Ascend.
One of them helps the team to really escape. He thinks that the aggressiveness preprogrammed into them is what is stopping them Ascend. Rodney is able to reprogram his base code and they steal a jumper and leave. But the other replicators reach out to him and revert him back. When he attacks Weir the team eject him from the Jumper.
These were too much like the Milky Way Replicators. If it is some fundamental rule that artificial robotic life is always going to evolve into creatures like this then fair enough, but Rodney would need to provide me with some detailed evidence.
They now know the location of Atlantis and of Earth. One of them said "More Bad Guys", I can't remember who, but too right!