r/webdev • • Oct 06 '26

AI generated code copyrights

Does anyone consider the copyright of code generated by AI? Because, based on research I've done on Copyright and Artificial Intelligence, generated code fall to the public domain, and if you modify it, only the modified parts belong to you. Also, a detailed prompt isn't enough.

This is, in my view, a major issue; yes, we can ignore it and consider it backward law, but no one knows what would happen in the future, and this law could be used against you.

Edit: here sources for USA https://www.congress.gov/crs-product/LSB10922 ,
For Europe : https://www.europarl.europa.eu/thinktank/en/document/EPRS_BRI(2025)782585
blog : https://smpl.as/blog/ai-code-ownership-legal ...

0 Upvotes

53 comments sorted by

View all comments

9

u/[deleted] Oct 07 '26 edited Oct 07 '26

[removed] — view removed comment

10

u/Willing_Comb_9542 Backend developer Oct 07 '26

I only see this as a good thing to prevent another "oracle v Google"

Everyone is so fucking protective over their function to add two numbers together and it's weirder than "inventors" with their parents 

1

u/[deleted] Oct 07 '26

[removed] — view removed comment

0

u/stupidcookface Oct 08 '26

Is this just going to apply to one-shot code? What if your continuously shaping the direction of the code in other ways? I can see so much grey area here depending on how you're prompting and interacting with how the code gets built. And this is just code I'm talking about, not images or videos or music. I mean...its all 0s and 1s at the end of the day but saying that code can be copywritten before ai and then saying it can't be copywritten if ai wrote any of it seems insane to me.

2

u/flyby_apis Oct 07 '26

Not a lawyer but I think people are worrying on wrong things

For closed-source code, copyright isn't really what it's protecting you, trade secrett law is

If you have your codein a private repo and you keep it confidential, it's protected. "Public domain" only matters if someone can actually get the code

Where it does matter is that you're publishing: open-source licenses rely on you having copyright, so AI gives your license less to enforce

And the bigger risk is the reverse: AI sometimes reproduces existing licensed code which is an infringement risk

1

u/[deleted] Oct 07 '26

[removed] — view removed comment

2

u/zorecknor Oct 07 '26

So long as the code doesn't get leaked.

You get protection even if it is leaked (if you have a big enough warchest). The code itself may not be copyrigthable, but the concepts expressed by the code can be trade secrets.

You can patent a new algorithm and give the GenAI generate the code to the patent office as an example, and nobody can use that code in their product because the algoritm itself is protected.

Same with Trademarks. I can create a character and trademark it. Then I can use GenAI to create an image of it. The image itself is not protected by copyright, but I CAN force you not to use it because I need to defend my trademark.