IR35 in practice
The written agreement is evidence, not the answer. What decides status is the working arrangement it describes, and whether that arrangement is what actually happens on a Tuesday.
Who decides what gets done, how it gets done, when, and where. A client is entitled to say what the outcome must be; the further they go into how, the worse it looks.
Could you send somebody competent in your place and pay them yourself? Not whether you would — whether the client would have to accept it.
A clause that lets the client refuse a substitute "at its sole discretion" is worth almost nothing. One that has actually been used, once, with an invoice to prove it, is worth more than any amount of drafting.
Is the client obliged to keep finding you work, and are you obliged to take it? A contract that runs on regardless of whether there is anything to do starts to look like employment.
This is the test people quote most and evidence least. If your contract ends when the project ends, say so plainly — and check the notice clause does not quietly turn it into a rolling arrangement.
If the end client is a medium or large business, they must produce one, pass it to you and to the agency, and give reasons. "Inside, per group policy" is not a reason.
Small companies are outside the off-payroll rules entirely, and then the old position applies: the responsibility for getting status right stays with your own company. People often discover this after a year of assuming somebody else was deciding.