Give a stream of consciousness and then the final answer. By the end of the fourth season, Tony and Carmela separate after Tony's former mistress Irina Peltsin calls the Soprano home, talks to A.J., and informs Carmela that Tony slept with Irina's cousin and Junior's nurse, Svetlana Kirilenko. Carmela even begins dating A.J.'s guidance counselor, Robert Wegler, and pursuing divorce proceedings against Tony, but is drawn back to her husband by financial concerns and difficulties in rearing A.J., as well as a difficult breakup with Wegler, who correctly accuses Carmela of using sex to manipulate him into giving A.J. special treatment in school. At the end of the fifth season, Carmela agrees to reunite with Tony after he agrees to purchase a $600,000 investment property in Montville, under Carmela's name, so she could build a spec house. Despite some initial awkwardness, the two are firmly reunited after Tony is shot by his uncle, Junior Soprano, both during his coma and after his hospital release. The crisis seems to have strengthened their bond.

Based on this passage, when did tony and carmela get back together?
To answer this question, we should know that: At the end of the fifth season, Carmela agrees to reunite with Tony after he agrees to purchase a $600,000 investment property in Montville, under Carmela's name, so she could build a spec house.
So, the final answer is At the end of the fifth season.