You can have an agent loop in your IDE, I don't see why anything makes "IDEs lose to TUIs" there.
If anything, TUIs are the awkward in-between of "human in the loop, but with poor tools" where one side is fully automatic, agents suggesting fixes on issue tracker, and the other is holding-AI's-hand where you review every step one at a time.
I hate trying to copy paste in/out of Claude Code's unnecessarily-cute boxed text input.
Zed's implementation of the agent feedback loop isn't yet as good as Claude Code, but there's nothing inherently IDE-related in the parts that are lacking.
https://zed.dev/docs/ai/agent-panel