The answer is tools. A tool is real software that sits outside the model, a terminal, a file reader, a web fetcher. The model still can't touch any of it directly. What it can do is emit a structured request: please run the tests. The tool actually executes, and whatever happened, output, errors, file contents, gets pasted back into the context window, the only place a model can ever read from.
Here's one round trip, slowed right down.