I don't know why you would run an agent loop without TDD? Should you write code without test coverage? So something must run the tests to be sufficient anyway?
You can have the agent write them after. The article is specifically about TDD, meaning writing a small test that will fail, making it pass, (refactoring), and repeating until the feature is finished.
Was there a difference in cost?
The author claims TDD used 3x tokens, but points out it might not be 3x the cost due to caching. It's near the end of the article.