> an LLM, especially the more modern ones, have way more short term memory than most humans
But it's not unlimited. So they can write code that they "understand" within the limits of their working context. When it grows beyond that, they can't cope with it in its entirety. And a human, at that point, has no prayer.