Arriving from the Championship outfit, Cole joins for a second taste of Sky Bet League Two after spending time on loan at Newport County during the 2017/18 campaign.
The 20-year-old rose through the ranks at Griffin Park to sign a professional contract in February 2016 after impressing through the age groups.
A first-team debut followed a little over a year later against Nottingham Forest before signing on loan for the Exiles at the start of last season.
Cole made an instant impact by netting the winner against Coventry City on his debut prior to a knee injury cutting short his spell in Wales.
Having spent the majority of pre-season with the Bees, the Londoner links up with the Glovers ahead of the league campaign kicking off next weekend.
Praising his newest recruit, manager Darren Way told YTFC.net: “Reece is a very gifted player in terms of technique and has a good selection and range of passing.
I’m hoping he can clock up the number of games that his CV needs at this stage of his career.”