Pretty much the same with LLMs as in other contexts. You set up a system where LLM output is used as input (a new prompt) as well. Or you have an external system that repeatedly prompts an LLM to "continue" with what it was doing before, perhaps examining some test results to massage the context window first, etc.