The Teamsters are throwing a wrench into the works of the self-driving movement.

The union has persuaded United States lawmakers to exempt commercial trucks from a bill allowing more autonomous vehicles on the roads. Granted, 3.5 million jobs are at stake. But as Tesla Motors joins Daimler A.G. and others in the big-rig tech race, it’d be smarter to prepare haulers for a career shift.

Congress is expected to tackle the first federal legislation on self-driving vehicles in September after it returns from summer recess. The bipartisan plan raises the cap on permitted vehicles that don’t have common features such as a steering wheel, or meet certain safety requirements, to 100,000 a year from the current limit of 2,500.

The Teamsters successfully lobbied to exclude vehicles over 10,000 pounds. Yet the technology is rapidly advancing. Daimler was testing a self-driving rig on Nevada’s roads in 2015. Last year, Otto, a start-up now owned by Uber, made one of the first known deliveries by an autonomous truck — 50,000 cans of beer. This week, Reuters reported that Tesla was developing an electric, driverless semi-truck. Alphabet’s Waymo is making similar moves.

The union has opposed other policy pushes, such as states wanting to allow companies to use what is known as platooning technology. This would digitally connect a group of trucks so they drive in a gas-saving formation. It is seen as a precursor to autonomous trucks, and Arkansas, Tennessee and South Carolina are among the states considering such a move.