Doe v. GitHub already decided (I'm simplifying, read the actual thing yourself) that LLM output is not automatically open source - or specifically it doesn't infringe on the open source training material and doesn't inherit the oss copyright notice.
Thaler v. Perlmutter (again simplified) showed 100% AI output can't be given any copyright.
The directions the current cases are going are very much opposed to that idea and I wouldn't expect things to change in the opposite direction.
AI generated art with human steering is copyrightable [1].
Agentic code development is human steering, thus copyrightable under the same grounds.
Open source code is copyrighted, otherwise we would be talking about public domain.
When you edit something in the public domain to enrich it, it then becomes copyrightable again.
[1] https://news.artnet.com/art-world/invoke-snags-first-ai-imag...
Remember that's in the US, most other places (UK etc..), it can be copyrighted.