I'm amazed that people sign contracts accepting this kind of restrictions to their lives.
That's (fortunately) illegal in the EU country I live in, as it creates artificial barriers in the job "market", i.e. it is illegal to limit people's access to work. Still, cartel practices like not hiring from "friendly companies" abound.
>> If I hire a consultancy company to build something for me, would I normally be able to directly hire the employees who did the work?
I see contracts imposing restrictions like this all the time where I live, and people sadly just nod and accept, but these clauses never hold up in court as no company has a right to decide where people can or can't work.
Having worked as a consultant, I'm repulsed by the idea that I'd need my company's permission to leave and go work for a client. Especially because the provision stinks of "cheaper than actually investing in people retention". If the issue is intellectual property transfer, that's what an NDA is for.