What's the deal if you are:
Is the code you write on your developer machine automatically copyrighted in your name and not in the startups name ?
In addition, at what point does it change that the code you are producing becomes property of the startup?
@user9968 , your question didn't contain the relevant information required to answer it.
You're a person. If you create some code, then absent any contracts or agreements stating otherwise, the copyright on the code belongs to you.
However, the most common situation is that developers have signed contracts which transfer copyright of their work -- the most common example is the employment contract -- see more below.
The obvious questions are:
Regarding inadvertently transferring copyright, that's a little bit more complicated.
Important: The above is not qualified legal advice, and you really should go see a lawyer.
There's an implied duty of loyalty and good faith among members of a joint venture. When a group of people all contribute to a speculative endeavor, courts tend to think that any gain from the endeavor should be shared fairly among them. Meinhard v. Salmon is the classic case on this.
That doctrine might not apply in your particular circumstances. I don't know, without the details and a lot more legal research. But you should know that it's out there: you could run into trouble if you assume that black-letter copyright law is all that's at issue.
If you signed a non-disclosure and discussed the idea together, and baked the idea together then you couldn't probably do anything with the code anyways as it would probably break your NDA. My guess is I would error on the side of the group / company owning it since you guys all baked the idea together.
Watch - The Social Network ;) in the end it's who is willing to fight for it.
It depends on what your work agreement/contract says. Did you sign anything or agree to anything that transfers ownership of your work to another entity?