Turns out that the isolated room Thomas was in was his Phase Three of the Trials. All of the other Gladers had to go through a Phase Three as well.
Rat Man leads Thomas to a room, and he's greeted by all of his fellow Gladers (Groups A and B). Everyone seems happy and talkative, but who knows, they could all just be faking it.
Thomas notices that Jorge and Brenda aren't there. He's just about to ask Rat Man about their whereabouts when he sees Teresa.
Cue awkward stare-down in 3-2-1.
Thomas tries calling out to Teresa telepathically, but she doesn't respond. Instead they just stare at each other like idiots.
After some nice pats on the back from Minho and Newt, Teresa tells Thomas that WICKED cut her off from talking to him. Hmm, likely story.
Rat Man decides to interrupt everybody with a little—or should we say, huge—announcement. It's time to "remove the Swipe" (4.25).
Meaning: its' time to give everyone their memories back.