The IRS and other agencies start to consider a temp employee
permanent, and eligible for all benefits, after about 12
months.
View page
There is no legal time limit. As long as you are w-2 you are
technically an employee of the temp agency. I worked for 3 years
for Pepsi before getting fed up and finding a real job and I've
heard of others who were temps for over 10 years. It is becoming a
very pervassive for of labor abuse especially in STEM professions
and there is nothing that can be done except keep searching for a
perm job and quit when you are offered one.