> With most Work for Hire agreements in the US, the client owns the code..
I think you have this backwards. By default the creator owns the code. (unless you agree in writing otherwise) Some exceptions I am aware of (IANAL) is if you are an employee, then the employer owns the code by default.
Under the "work for hire" clause, I think (?) that if you are commissioned for the work as an individual, you should have the copyright by default but may not have the copyright based on agreements made. But if you are commissioned as a business entity, your business entity would own the copyright. (again, unless explicitly agreed otherwise)
If someone else can chime here, as I may be wrong on this.
That's true of code developed in the absence of a working agreement. What GP meant, I assume, was that in _most_ cases, when you freelance or contract with a business with a MSA or other contract, that contract is going to specify that the work performed is WFH. Default ownership of copyright and code doesn't apply in this case.
But, if for some reason the agreement didn't specifically note the work performed as WFH then yes, the developer still owns the copyright to code they worked on. Where it gets muddy as hell is when you work with a team, some of whom may be other contractors and some of whom may be employees of the client.
I have signed a number of work agreements when being hired by a number of US companies.
They all clearly state that I transfer all rights, including the copyright, to the company. But it only applies to the code I write using company's technical means, or otherwise as a part of doing my job.
(Hence I keep any private stuff on my own laptop, never on company's.)
I think you have this backwards. By default the creator owns the code. (unless you agree in writing otherwise) Some exceptions I am aware of (IANAL) is if you are an employee, then the employer owns the code by default.
Under the "work for hire" clause, I think (?) that if you are commissioned for the work as an individual, you should have the copyright by default but may not have the copyright based on agreements made. But if you are commissioned as a business entity, your business entity would own the copyright. (again, unless explicitly agreed otherwise)
If someone else can chime here, as I may be wrong on this.
https://en.wikipedia.org/wiki/Work_for_hire