I believe you would have to abide by terms of agreement.
Your employer has to work this out with the agency. Otherwise there may be legal action, but they will not dock your pay.This situation is a common occurrence and usually the employer just has to pay a fee temporarily to the agency. It can work out well for all parties.
In most cases you would be making more than what the agency was paying you. If that s not the case you might want to stick with the agency. You have to weigh your options though? Is the agency offering insurance?