"Vanderpump Rules" producers saw the writing on the wall for Max Boyens and Brett Caprioni when their racist tweets first resurfaced, and immediately started phasing them out ... TMZ has learned.
Sources close to 'VP' production tell us ... season 8 was already shot, in the can and about to premiere in January when rookie cast members Max and Brett's old tweets were exposed. So, behind the scenes, producers started re-editing episodes in order to reduce their precious airtime.
We're told portions of their footage were switched up or even left on the cutting room floor. Ditto for their confessional interviews.
Our sources say because of the 2011 and 2012 tweets -- in which Brett and Max both used the n-word -- 'VP' producers knew they wouldn't be back for a second season. We're told production found the tweets "inexcusable."
Lisa Vanderpump took some heat for allowing Max and Brett to continue on her staff long after learning of their tweets, but said she forgave them for their actions years ago. Plus, she had to wait for Bravo to make the final call.
However, she later released a statement expressing sadness and disappointment in her staff's actions and said ... "The world needs to move forward with a kinder generation. Everybody deserves to feel safe, heard and appreciated in their communities."