It won't happen.
The essence of programming is having a vague description of a problem and figuring it out a way to solve it very, very precisely. This is just not a thing that can be done using AI. Any progress that has been made in AI is just the opposite: Put in a very precise question or description of the problem and you may get a vague answer.
Heck, if, even two decades from now we have some form of AI that just barely understands _existing_ code so that it can have at least a simple discussion with the programmer, I would be very surprised.
Heck, if, even two decades from now we have some form of AI that just barely understands _existing_ code so that it can have at least a simple discussion with the programmer, I would be very surprised.